Skip to content

Commit 444090f

Browse files
committed
Don't show mutual groups for deleted threads
1 parent 3bf1950 commit 444090f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Signal/src/ViewControllers/ConversationView/CV/CVComponents/CVComponentThreadDetails.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public class CVComponentThreadDetails: CVComponentBase, CVRootComponent {
189189
}
190190

191191
let groupThreads = TSGroupThread.groupThreads(with: contactThread.contactAddress, transaction: transaction)
192-
let mutualGroupNames = groupThreads.map { $0.groupNameOrDefault }
192+
let mutualGroupNames = groupThreads.filter { $0.isLocalUserFullMember && $0.shouldThreadBeVisible }.map { $0.groupNameOrDefault }
193193

194194
let formatString: String
195195
var groupsToInsert = mutualGroupNames

SignalServiceKit/src/Contacts/Threads/TSGroupThread.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ + (nullable instancetype)fetchWithGroupId:(NSData *)groupId transaction:(SDSAnyR
139139
block:^(TSThread *thread, BOOL *stop) {
140140
if ([thread isKindOfClass:[TSGroupThread class]]) {
141141
TSGroupThread *groupThread = (TSGroupThread *)thread;
142-
if ([groupThread.groupModel.groupMembership.fullMembers
143-
containsObject:address]
144-
&& groupThread.isLocalUserFullMember) {
142+
if ([groupThread.groupModel.groupMembers containsObject:address]) {
145143
[groupThreads addObject:groupThread];
146144
}
147145
}

0 commit comments

Comments
 (0)