From 51131df23b86a3f04b6bc3358c8f89b8e09c2563 Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 20 Feb 2017 19:48:06 -0800 Subject: [PATCH] Update libsignal-protocol-javascript 1.1.9 // FREEBIE --- js/libtextsecure.js | 6 +++--- libtextsecure/libsignal-protocol.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 9655883d..b60833fd 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -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; }); diff --git a/libtextsecure/libsignal-protocol.js b/libtextsecure/libsignal-protocol.js index d9762f5a..96147015 100644 --- a/libtextsecure/libsignal-protocol.js +++ b/libtextsecure/libsignal-protocol.js @@ -35626,7 +35626,7 @@ Internal.SessionRecord = function() { }, haveOpenSession: function() { var openSession = this.getOpenSession(); - return (!!openSession && !!openSession.registrationId); + return (!!openSession && typeof openSession.registrationId === 'number'); }, getSessionByBaseKey: function(baseKey) { @@ -35872,7 +35872,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) @@ -35931,7 +35931,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; });