(account: any)
| 6 | import { tc } from '@linen/utilities/tc'; |
| 7 | |
| 8 | function 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 | |
| 24 | function hasAuthFn(account: any) { |
| 25 | if (account.slackAuthorizations?.length) { |