libsignal-protocol: Be resilient to missing open session
This commit is contained in:
parent
eae7660074
commit
494806b314
1 changed files with 2 additions and 1 deletions
|
@ -36185,7 +36185,8 @@ SessionCipher.prototype = {
|
|||
var errors = [];
|
||||
return this.decryptWithSessionList(buffer, record.getSessions(), errors).then(function(result) {
|
||||
return this.getRecord(address).then(function(record) {
|
||||
if (result.session.indexInfo.baseKey !== record.getOpenSession().indexInfo.baseKey) {
|
||||
var openSession = record.getOpenSession();
|
||||
if (!openSession || result.session.indexInfo.baseKey !== openSession.indexInfo.baseKey) {
|
||||
record.archiveCurrentState();
|
||||
record.promoteState(result.session);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue