Show verified/keychange notifications when actually relevant

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-03 17:31:57 -07:00
parent 3d445fe549
commit 20451cc827
6 changed files with 52 additions and 14 deletions

View file

@ -625,9 +625,12 @@
timestamp : Date.now(),
nonblockingApproval : true
}).then(function() {
if (!isPresent || !isEqual) {
if (isPresent && !isEqual) {
this.trigger('keychange', identifier);
return this.archiveAllSessions(identifier).then(resolve, reject);
return this.archiveAllSessions(identifier).then(function() {
// true signifies that we overwrote a previous key with a new one
return resolve(true);
}, reject);
}
return resolve();