Don't sync blocked contacts

This commit is contained in:
Niels Andriesse 2021-02-25 09:33:41 +11:00
parent 220486441d
commit 8fd0cf79b9
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ extension ConfigurationMessage {
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 }
guard let thread = TSContactThread.fetch(uniqueId: threadID, transaction: transaction), thread.shouldThreadBeVisible
&& !SSKEnvironment.shared.blockingManager.isRecipientIdBlocked(publicKey) else { return }
let profilePictureURL = profile.avatarUrlPath
let profileKey = profile.profileKey?.keyData
let contact = ConfigurationMessage.Contact(publicKey: publicKey, displayName: displayName,