mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-01 22:01:49 +01:00
libsignal-protocol: Be resilient to missing open session
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user