From 982e7f962cfb5bbbb6ab2784a296ca319edf4f04 Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 27 Jun 2017 09:44:05 -1000 Subject: [PATCH] Update libsignal-protocol // FREEBIE --- js/libtextsecure.js | 8 ++++---- libtextsecure/libsignal-protocol.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index d42b07da5d..7337d7e655 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -35994,7 +35994,7 @@ SessionBuilder.prototype = { record.updateSessionState(session); return Promise.all([ this.storage.storeSession(address, record.serialize()), - this.storage.saveIdentity(this.remoteAddress.getName(), session.indexInfo.remoteIdentityKey) + this.storage.saveIdentity(this.remoteAddress.toString(), session.indexInfo.remoteIdentityKey) ]); }.bind(this)); }.bind(this)); @@ -36051,7 +36051,7 @@ SessionBuilder.prototype = { // end of decryptWhisperMessage ... to ensure that the sender // actually holds the private keys for all reported pubkeys record.updateSessionState(new_session); - return this.storage.saveIdentity(this.remoteAddress.getName(), message.identityKey.toArrayBuffer()).then(function() { + return this.storage.saveIdentity(this.remoteAddress.toString(), message.identityKey.toArrayBuffer()).then(function() { return message.preKeyId; }); }.bind(this)); @@ -36254,7 +36254,7 @@ SessionCipher.prototype = { throw new Error('Identity key changed'); } }).then(function() { - return this.storage.saveIdentity(this.remoteAddress.getName(), session.indexInfo.remoteIdentityKey); + return this.storage.saveIdentity(this.remoteAddress.toString(), session.indexInfo.remoteIdentityKey); }.bind(this)).then(function() { record.updateSessionState(session); return this.storage.storeSession(address, record.serialize()).then(function() { @@ -36336,7 +36336,7 @@ SessionCipher.prototype = { throw new Error('Identity key changed'); } }).then(function() { - return this.storage.saveIdentity(this.remoteAddress.getName(), result.session.indexInfo.remoteIdentityKey); + return this.storage.saveIdentity(this.remoteAddress.toString(), result.session.indexInfo.remoteIdentityKey); }.bind(this)).then(function() { record.updateSessionState(result.session); return this.storage.storeSession(address, record.serialize()).then(function() { diff --git a/libtextsecure/libsignal-protocol.js b/libtextsecure/libsignal-protocol.js index ce08875623..233f2c0085 100644 --- a/libtextsecure/libsignal-protocol.js +++ b/libtextsecure/libsignal-protocol.js @@ -35857,7 +35857,7 @@ SessionBuilder.prototype = { record.updateSessionState(session); return Promise.all([ this.storage.storeSession(address, record.serialize()), - this.storage.saveIdentity(this.remoteAddress.getName(), session.indexInfo.remoteIdentityKey) + this.storage.saveIdentity(this.remoteAddress.toString(), session.indexInfo.remoteIdentityKey) ]); }.bind(this)); }.bind(this)); @@ -35914,7 +35914,7 @@ SessionBuilder.prototype = { // end of decryptWhisperMessage ... to ensure that the sender // actually holds the private keys for all reported pubkeys record.updateSessionState(new_session); - return this.storage.saveIdentity(this.remoteAddress.getName(), message.identityKey.toArrayBuffer()).then(function() { + return this.storage.saveIdentity(this.remoteAddress.toString(), message.identityKey.toArrayBuffer()).then(function() { return message.preKeyId; }); }.bind(this)); @@ -36117,7 +36117,7 @@ SessionCipher.prototype = { throw new Error('Identity key changed'); } }).then(function() { - return this.storage.saveIdentity(this.remoteAddress.getName(), session.indexInfo.remoteIdentityKey); + return this.storage.saveIdentity(this.remoteAddress.toString(), session.indexInfo.remoteIdentityKey); }.bind(this)).then(function() { record.updateSessionState(session); return this.storage.storeSession(address, record.serialize()).then(function() { @@ -36199,7 +36199,7 @@ SessionCipher.prototype = { throw new Error('Identity key changed'); } }).then(function() { - return this.storage.saveIdentity(this.remoteAddress.getName(), result.session.indexInfo.remoteIdentityKey); + return this.storage.saveIdentity(this.remoteAddress.toString(), result.session.indexInfo.remoteIdentityKey); }.bind(this)).then(function() { record.updateSessionState(result.session); return this.storage.storeSession(address, record.serialize()).then(function() {