composableGroups: Exclude groups where you're not a member

This commit is contained in:
Scott Nonnenberg 2024-03-05 09:36:36 -08:00 committed by GitHub
parent d10126d337
commit 407b6b0f97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<string>
): Array<ConversationType> => {
return groups.filter(
group =>
!isGroupInStoryMode(group, conversationIdsWithStories) && !group.left
group => !isGroupInStoryMode(group, conversationIdsWithStories)
);
}
);