| 4 | import { getLinenUrl } from '@linen/utilities/domain'; |
| 5 | |
| 6 | function buildInviteUrl(account: accounts, communityType: CommunityType) { |
| 7 | if (account.communityInviteUrl) { |
| 8 | return account.communityInviteUrl; |
| 9 | } |
| 10 | if (communityType === CommunityType.discord) { |
| 11 | return `https://discord.com/channels/${account.discordServerId}`; |
| 12 | } |
| 13 | if (communityType === CommunityType.slack) { |
| 14 | return `https://${account.slackDomain}.slack.com`; |
| 15 | } |
| 16 | return ''; |
| 17 | } |
| 18 | |
| 19 | export const communityMapping: Record<string, 'd' | 's'> = { |
| 20 | discord: 'd', |