Skip to content

Commit

Permalink
Prevent previewing messages of gated chats (#5984)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Jul 3, 2024
1 parent 4db8195 commit 31b8738
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/app/src/components/home/CurrentChatMessages.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@
$: privateCommunityPreview =
$selectedCommunity !== undefined &&
$selectedCommunity.membership.role === "none" &&
(!$selectedCommunity.public || $selectedCommunity.gate.kind === "payment_gate");
(!$selectedCommunity.public || $selectedCommunity.gate !== undefined);
$: privateChatPreview =
(chat.kind === "group_chat" || chat.kind === "channel") &&
chat.membership.role === "none" &&
(!chat.public || chat.gate.kind === "payment_gate");
(!chat.public || chat.gate !== undefined);
$: privatePreview = privateCommunityPreview || privateChatPreview;
$: isEmptyChat = chat.latestEventIndex <= 0 || privatePreview;
Expand Down

0 comments on commit 31b8738

Please sign in to comment.