From baf379e6c790bc94d41c2457c91c1e63ac27d40b Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 19 Jun 2020 14:50:44 +1000 Subject: [PATCH] Fix unknown contacts in new closed group screen --- Signal/src/Loki/View Controllers/NewClosedGroupVC.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Signal/src/Loki/View Controllers/NewClosedGroupVC.swift b/Signal/src/Loki/View Controllers/NewClosedGroupVC.swift index d907cc98c..396f6b36c 100644 --- a/Signal/src/Loki/View Controllers/NewClosedGroupVC.swift +++ b/Signal/src/Loki/View Controllers/NewClosedGroupVC.swift @@ -7,8 +7,9 @@ final class NewClosedGroupVC : BaseVC, UITableViewDataSource, UITableViewDelegat let storage = OWSPrimaryStorage.shared() storage.dbReadConnection.read { transaction in TSContactThread.enumerateCollectionObjects(with: transaction) { object, _ in - guard let thread = object as? TSContactThread, thread.isContactFriend else { return } + guard let thread = object as? TSContactThread, thread.shouldThreadBeVisible && thread.isContactFriend else { return } let hexEncodedPublicKey = thread.contactIdentifier() + guard UserDisplayNameUtilities.getPrivateChatDisplayName(for: hexEncodedPublicKey) != nil else { return } // We shouldn't be able to add slave devices to groups if (storage.getMasterHexEncodedPublicKey(for: hexEncodedPublicKey, in: transaction) == nil) { result.append(hexEncodedPublicKey)