MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / identifyCommunity

Function identifyCommunity

packages/serializers/src/account.ts:8–22  ·  view source on GitHub ↗
(account: any)

Source from the content-addressed store, hash-verified

6import { tc } from '@linen/utilities/tc';
7
8function identifyCommunity(account: any) {
9 if (account.slackAuthorizations?.length) {
10 return CommunityType.slack;
11 }
12 if (account.discordAuthorizations?.length) {
13 return CommunityType.discord;
14 }
15 if (account.discordServerId) {
16 return CommunityType.discord;
17 }
18 if (account.slackTeamId) {
19 return CommunityType.slack;
20 }
21 return null;
22}
23
24function hasAuthFn(account: any) {
25 if (account.slackAuthorizations?.length) {

Callers 1

serializeAccountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected