Make verified notifications consistent

This commit is contained in:
Scott Nonnenberg
2025-10-10 04:09:12 +10:00
committed by GitHub
parent 75269adfe1
commit 4e2827af4b
3 changed files with 45 additions and 36 deletions

View File

@@ -1512,11 +1512,12 @@ export async function mergeContactRecord(
}
const newVerified = fromRecordVerified(identityState);
const needsNotification = await signalProtocolStore.updateIdentityAfterSync(
serviceId,
newVerified,
contactRecord.identityKey
);
const { shouldAddVerifiedChangedMessage } =
await signalProtocolStore.updateIdentityAfterSync(
serviceId,
newVerified,
contactRecord.identityKey
);
if (verified !== newVerified) {
details.push(
@@ -1528,7 +1529,7 @@ export async function mergeContactRecord(
}
const VERIFIED_ENUM = signalProtocolStore.VerifiedStatus;
if (needsNotification) {
if (shouldAddVerifiedChangedMessage) {
details.push('adding a verified notification');
await conversation.addVerifiedChange(
conversation.id,