Fix check for session equivalence
This check didn't work, which resulted in closing and then immediately reopening the current session. Not that big a deal, since it merely flips a flag off and back on again just before saving the session record, but does result in spurious log statements.
This commit is contained in:
parent
b77842c30e
commit
b0ed2e5e4f
2
dist/libsignal-protocol.js
vendored
2
dist/libsignal-protocol.js
vendored
@ -36177,7 +36177,7 @@ SessionCipher.prototype = {
|
||||
var errors = [];
|
||||
return this.decryptWithSessionList(buffer, record.getSessions(), errors).then(function(result) {
|
||||
return this.getRecord(address).then(function(record) {
|
||||
if (result.session !== record.getOpenSession()) {
|
||||
if (result.session.indexInfo.baseKey !== record.getOpenSession().indexInfo.baseKey) {
|
||||
record.archiveCurrentState();
|
||||
record.promoteState(result.session);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ SessionCipher.prototype = {
|
||||
var errors = [];
|
||||
return this.decryptWithSessionList(buffer, record.getSessions(), errors).then(function(result) {
|
||||
return this.getRecord(address).then(function(record) {
|
||||
if (result.session !== record.getOpenSession()) {
|
||||
if (result.session.indexInfo.baseKey !== record.getOpenSession().indexInfo.baseKey) {
|
||||
record.archiveCurrentState();
|
||||
record.promoteState(result.session);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user