Fix userProfileWriter for message-sourced changes

This commit is contained in:
Max Radermacher 2026-05-06 15:01:14 -05:00 committed by GitHub
parent 5495a6a0eb
commit 489271dae8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -319,10 +319,9 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
blockingManager.removeBlockedThread(thread, wasLocallyInitiated: false, transaction: transaction)
switch thread {
case let thread as TSGroupThread:
// TODO: Fix userProfileWriter.
profileManager.addGroupId(
toProfileWhitelist: thread.groupModel.groupId,
userProfileWriter: .localUser,
userProfileWriter: .syncMessage,
transaction: transaction,
)
@ -334,8 +333,7 @@ extension OWSSyncManager: SyncManagerProtocol, SyncManagerProtocolSwift {
/// and unhide here.
if var recipient = recipientFetcher.fetchOrCreate(address: thread.contactAddress, tx: transaction) {
hidingManager.removeHiddenRecipient(&recipient, wasLocallyInitiated: false, tx: transaction)
// TODO: Fix userProfileWriter.
profileManager.addRecipientToProfileWhitelist(&recipient, userProfileWriter: .localUser, tx: transaction)
profileManager.addRecipientToProfileWhitelist(&recipient, userProfileWriter: .syncMessage, tx: transaction)
}
default:

View File

@ -404,7 +404,7 @@ public final class MessageReceiver {
if let groupId {
SSKEnvironment.shared.profileManagerRef.addGroupId(
toProfileWhitelist: groupId.serialize(),
userProfileWriter: .localUser,
userProfileWriter: .syncMessage,
transaction: tx,
)
} else {
@ -422,7 +422,7 @@ public final class MessageReceiver {
let profileManager = SSKEnvironment.shared.profileManagerRef
let recipientFetcher = DependenciesBridge.shared.recipientFetcher
if var recipient = recipientFetcher.fetchOrCreate(address: destinationAddress, tx: tx) {
profileManager.addRecipientToProfileWhitelist(&recipient, userProfileWriter: .localUser, tx: tx)
profileManager.addRecipientToProfileWhitelist(&recipient, userProfileWriter: .syncMessage, tx: tx)
}
}
}