Skip to content

Commit

Permalink
Don't support invite links to "private" channels (#5658)
Browse files Browse the repository at this point in the history
  • Loading branch information
megrogan authored Apr 9, 2024
1 parent 35cefc4 commit 3673c7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
$: currentUser = client.user;
$: canEdit = client.canEditGroupDetails(chat.id);
$: canSend = client.canSendMessage(chat.id, "any");
$: canInvite = client.canInviteUsers(chat.id) && (chat.kind === "group_chat" || chat.public);
$: canInvite =
client.canInviteUsers(chat.id) && (chat.kind !== "channel" || !client.isChatPrivate(chat));
$: avatarSrc = client.groupAvatarUrl(chat);
$: currentChatRules = client.currentChatRules;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
export let container: MultiUserChat | CommunitySummary;
$: canInvite =
client.canInviteUsers(container.id) && (container.kind !== "channel" || container.public);
client.canInviteUsers(container.id) &&
(container.kind !== "channel" || !client.isChatPrivate(container));
const dispatch = createEventDispatcher();
let usersToInvite: UserSummary[] = [];
Expand Down

0 comments on commit 3673c7a

Please sign in to comment.