Only include contacts with a visible thread
This commit is contained in:
parent
643bfbdb41
commit
be466c26fc
|
@ -32,6 +32,8 @@ extension ConfigurationMessage {
|
|||
OWSUserProfile.enumerateCollectionObjects(with: transaction) { object, stop in
|
||||
guard let profile = object as? OWSUserProfile, let displayName = profile.profileName else { return }
|
||||
let publicKey = profile.recipientId
|
||||
let threadID = TSContactThread.threadId(fromContactId: publicKey)
|
||||
guard let thread = TSContactThread.fetch(uniqueId: threadID, transaction: transaction), thread.shouldThreadBeVisible else { return }
|
||||
let profilePictureURL = profile.avatarUrlPath
|
||||
let profileKey = profile.profileKey?.keyData
|
||||
let contact = ConfigurationMessage.Contact(publicKey: publicKey, displayName: displayName,
|
||||
|
|
Loading…
Reference in New Issue