|
|
|
@ -35763,7 +35763,7 @@ Internal.SessionRecord = function() {
|
|
|
|
|
},
|
|
|
|
|
haveOpenSession: function() {
|
|
|
|
|
var openSession = this.getOpenSession();
|
|
|
|
|
return (!!openSession && !!openSession.registrationId);
|
|
|
|
|
return (!!openSession && typeof openSession.registrationId === 'number');
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getSessionByBaseKey: function(baseKey) {
|
|
|
|
@ -36009,7 +36009,7 @@ SessionBuilder.prototype = {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
record.archiveCurrentState();
|
|
|
|
|
record.updateSessionState(session, device.registrationId);
|
|
|
|
|
record.updateSessionState(session);
|
|
|
|
|
return Promise.all([
|
|
|
|
|
this.storage.storeSession(address, record.serialize()),
|
|
|
|
|
this.storage.saveIdentity(this.remoteAddress.getName(), session.indexInfo.remoteIdentityKey)
|
|
|
|
@ -36068,7 +36068,7 @@ SessionBuilder.prototype = {
|
|
|
|
|
// Note that the session is not actually saved until the very
|
|
|
|
|
// end of decryptWhisperMessage ... to ensure that the sender
|
|
|
|
|
// actually holds the private keys for all reported pubkeys
|
|
|
|
|
record.updateSessionState(new_session, message.registrationId);
|
|
|
|
|
record.updateSessionState(new_session);
|
|
|
|
|
return this.storage.saveIdentity(this.remoteAddress.getName(), message.identityKey.toArrayBuffer()).then(function() {
|
|
|
|
|
return message.preKeyId;
|
|
|
|
|
});
|
|
|
|
|