From 407b6b0f975e6ac4418aec5f06b052768cfc5539 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 5 Mar 2024 09:36:36 -0800 Subject: [PATCH] composableGroups: Exclude groups where you're not a member --- ts/state/selectors/conversations.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/state/selectors/conversations.ts b/ts/state/selectors/conversations.ts index 5ea109277da..58dcc9d1413 100644 --- a/ts/state/selectors/conversations.ts +++ b/ts/state/selectors/conversations.ts @@ -544,7 +544,8 @@ function canComposeConversation(conversation: ConversationType): boolean { !isSignalConversation(conversation) && !conversation.isBlocked && !conversation.removalStage && - (isGroupV2(conversation) || !isConversationUnregistered(conversation)) && + ((isGroupV2(conversation) && !conversation.left) || + !isConversationUnregistered(conversation)) && hasDisplayInfo(conversation) && isTrusted(conversation) ); @@ -559,7 +560,7 @@ export const getAllComposableConversations = createSelector( !conversation.isBlocked && !conversation.removalStage && !conversation.isGroupV1AndDisabled && - (isGroupV2(conversation) || + ((isGroupV2(conversation) && !conversation.left) || !isConversationUnregistered(conversation)) && // All conversation should have a title except in weird cases where // they don't, in that case we don't want to show these for Forwarding. @@ -646,8 +647,7 @@ export const getNonGroupStories = createSelector( conversationIdsWithStories: Set ): Array => { return groups.filter( - group => - !isGroupInStoryMode(group, conversationIdsWithStories) && !group.left + group => !isGroupInStoryMode(group, conversationIdsWithStories) ); } );