MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / buildInviteUrl

Function buildInviteUrl

packages/serializers/src/settings.ts:6–17  ·  view source on GitHub ↗
(account: accounts, communityType: CommunityType)

Source from the content-addressed store, hash-verified

4import { getLinenUrl } from '@linen/utilities/domain';
5
6function 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
19export const communityMapping: Record<string, 'd' | 's'> = {
20 discord: 'd',

Callers 1

serializeSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected