processVerifiedMessage: Archive all sessions when key changes
FREEBIE
This commit is contained in:
parent
827addf628
commit
7bfb66b13b
2 changed files with 10 additions and 7 deletions
|
@ -606,17 +606,20 @@
|
|||
|| (isPresent && !isEqual)
|
||||
|| (isPresent && identityRecord.get('verified') !== VerifiedStatus.VERIFIED))) {
|
||||
|
||||
if (!isPresent || !isEqual) {
|
||||
this.trigger('keychange', identifier);
|
||||
}
|
||||
|
||||
textsecure.storage.protocol.saveIdentityWithAttributes(identifier, {
|
||||
publicKey : publicKey,
|
||||
verified : verifiedStatus,
|
||||
firstUse : false,
|
||||
timestamp : Date.now(),
|
||||
nonblockingApproval : true
|
||||
}).then(resolve, reject);
|
||||
}).then(function() {
|
||||
if (!isPresent || !isEqual) {
|
||||
this.trigger('keychange', identifier);
|
||||
return this.archiveAllSessions(identifier).then(resolve, reject);
|
||||
}
|
||||
|
||||
return resolve();
|
||||
}.bind(this), reject);
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue