diff --git a/js/models/conversations.js b/js/models/conversations.js index f944f29d4..9d75325d1 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -569,11 +569,7 @@ return textsecure.storage.protocol.saveIdentity( id, identityKey, false - ).then(function(isIdentityChange) { - if (isIdentityChange) { - return textsecure.storage.protocol.archiveAllSessions(id); - } - }); + ); }); }, diff --git a/js/signal_protocol_store.js b/js/signal_protocol_store.js index 981d12af1..c987022ab 100644 --- a/js/signal_protocol_store.js +++ b/js/signal_protocol_store.js @@ -457,7 +457,9 @@ nonblockingApproval : nonblockingApproval, }).then(function() { this.trigger('keychange', identifier); - resolve(true); + this.archiveAllSessions(identifier).then(function() { + resolve(true); + }, reject); }.bind(this)); } else if (this.isNonBlockingApprovalRequired(identityRecord)) { console.log("Setting approval status...");