composableGroups: Exclude groups where you're not a member

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
automated-signal 2024-03-05 19:22:53 -06:00 committed by GitHub
parent edd7ae4a59
commit 3239e804f9
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)
);
}
);