From fd610a630068c6f852be9775f55eb92aedca1689 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:54:13 -0700 Subject: [PATCH] Don't post extraneous verified change notification --- ts/models/conversations.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 3cd8ecb93..20d6b8231 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -2659,17 +2659,17 @@ export class ConversationModel extends window.Backbone } } - const didSomethingChange = keyChange || beginningVerified !== verified; + const didVerifiedChange = beginningVerified !== verified; const isExplicitUserAction = !options.viaStorageServiceSync; const shouldShowFromStorageSync = options.viaStorageServiceSync && verified !== UNVERIFIED; if ( - // The message came from an explicit verification in a client (not a contact sync - // or storage service sync) - (didSomethingChange && isExplicitUserAction) || - // The verification value received by the contact sync is different from what we + // The message came from an explicit verification in a client (not + // storage service sync) + (didVerifiedChange && isExplicitUserAction) || + // The verification value received by the storage sync is different from what we // have on record (and it's not a transition to UNVERIFIED) - (didSomethingChange && shouldShowFromStorageSync) || + (didVerifiedChange && shouldShowFromStorageSync) || // Our local verification status is VERIFIED and it hasn't changed, but the key did // change (Key1/VERIFIED -> Key2/VERIFIED), but we don't want to show DEFAULT -> // DEFAULT or UNVERIFIED -> UNVERIFIED