From ee3bc11e3c6430424ccb1f1bc5b47466fe51e368 Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 22 Apr 2016 13:32:19 -0700 Subject: [PATCH] Rename axolotlInstance // FREEBIE --- js/libtextsecure.js | 20 ++++++++++---------- libtextsecure/axolotl_wrapper.js | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 760b7073..b13d7796 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -35297,7 +35297,7 @@ Internal.RecipientRecord = function() { window.textsecure.storage = window.textsecure.storage || {}; textsecure.storage.axolotl = new SignalProtocolStore(); - var axolotlInstance = axolotl.protocol(textsecure.storage.axolotl); + var protocolInstance = axolotl.protocol(textsecure.storage.axolotl); /* * jobQueue manages multiple queues indexed by device to serialize @@ -35320,36 +35320,36 @@ Internal.RecipientRecord = function() { window.textsecure.protocol_wrapper = { decryptWhisperMessage: function(fromAddress, blob) { return queueJobForNumber(fromAddress, function() { - return axolotlInstance.decryptWhisperMessage(fromAddress, blob.toArrayBuffer()); + return protocolInstance.decryptWhisperMessage(fromAddress, blob.toArrayBuffer()); }); }, closeOpenSessionForDevice: function(encodedNumber) { return queueJobForNumber(encodedNumber, function() { - return axolotlInstance.closeOpenSessionForDevice(encodedNumber); + return protocolInstance.closeOpenSessionForDevice(encodedNumber); }); }, encryptMessageFor: function(deviceObject, pushMessageContent) { return queueJobForNumber(deviceObject.encodedNumber, function() { - return axolotlInstance.encryptMessageFor(deviceObject, pushMessageContent); + return protocolInstance.encryptMessageFor(deviceObject, pushMessageContent); }); }, startWorker: function() { - axolotlInstance.startWorker('/js/libsignal-protocol-worker.js'); + protocolInstance.startWorker('/js/libsignal-protocol-worker.js'); }, stopWorker: function() { - axolotlInstance.stopWorker(); + protocolInstance.stopWorker(); }, createIdentityKeyRecvSocket: function() { - return axolotlInstance.createIdentityKeyRecvSocket(); + return protocolInstance.createIdentityKeyRecvSocket(); }, hasOpenSession: function(encodedNumber) { return queueJobForNumber(encodedNumber, function() { - return axolotlInstance.hasOpenSession(encodedNumber); + return protocolInstance.hasOpenSession(encodedNumber); }); }, getRegistrationId: function(encodedNumber) { return queueJobForNumber(encodedNumber, function() { - return axolotlInstance.getRegistrationId(encodedNumber); + return protocolInstance.getRegistrationId(encodedNumber); }); }, handlePreKeyWhisperMessage: function(from, blob) { @@ -35361,7 +35361,7 @@ Internal.RecipientRecord = function() { throw new Error("Incompatible version byte"); } return queueJobForNumber(from, function() { - return axolotlInstance.handlePreKeyWhisperMessage(from, blob).catch(function(e) { + return protocolInstance.handlePreKeyWhisperMessage(from, blob).catch(function(e) { if (e.message === 'Unknown identity key') { blob.reset(); // restore the version byte. diff --git a/libtextsecure/axolotl_wrapper.js b/libtextsecure/axolotl_wrapper.js index a534c91a..aee45100 100644 --- a/libtextsecure/axolotl_wrapper.js +++ b/libtextsecure/axolotl_wrapper.js @@ -7,7 +7,7 @@ window.textsecure.storage = window.textsecure.storage || {}; textsecure.storage.axolotl = new SignalProtocolStore(); - var axolotlInstance = axolotl.protocol(textsecure.storage.axolotl); + var protocolInstance = axolotl.protocol(textsecure.storage.axolotl); /* * jobQueue manages multiple queues indexed by device to serialize @@ -30,36 +30,36 @@ window.textsecure.protocol_wrapper = { decryptWhisperMessage: function(fromAddress, blob) { return queueJobForNumber(fromAddress, function() { - return axolotlInstance.decryptWhisperMessage(fromAddress, blob.toArrayBuffer()); + return protocolInstance.decryptWhisperMessage(fromAddress, blob.toArrayBuffer()); }); }, closeOpenSessionForDevice: function(encodedNumber) { return queueJobForNumber(encodedNumber, function() { - return axolotlInstance.closeOpenSessionForDevice(encodedNumber); + return protocolInstance.closeOpenSessionForDevice(encodedNumber); }); }, encryptMessageFor: function(deviceObject, pushMessageContent) { return queueJobForNumber(deviceObject.encodedNumber, function() { - return axolotlInstance.encryptMessageFor(deviceObject, pushMessageContent); + return protocolInstance.encryptMessageFor(deviceObject, pushMessageContent); }); }, startWorker: function() { - axolotlInstance.startWorker('/js/libsignal-protocol-worker.js'); + protocolInstance.startWorker('/js/libsignal-protocol-worker.js'); }, stopWorker: function() { - axolotlInstance.stopWorker(); + protocolInstance.stopWorker(); }, createIdentityKeyRecvSocket: function() { - return axolotlInstance.createIdentityKeyRecvSocket(); + return protocolInstance.createIdentityKeyRecvSocket(); }, hasOpenSession: function(encodedNumber) { return queueJobForNumber(encodedNumber, function() { - return axolotlInstance.hasOpenSession(encodedNumber); + return protocolInstance.hasOpenSession(encodedNumber); }); }, getRegistrationId: function(encodedNumber) { return queueJobForNumber(encodedNumber, function() { - return axolotlInstance.getRegistrationId(encodedNumber); + return protocolInstance.getRegistrationId(encodedNumber); }); }, handlePreKeyWhisperMessage: function(from, blob) { @@ -71,7 +71,7 @@ throw new Error("Incompatible version byte"); } return queueJobForNumber(from, function() { - return axolotlInstance.handlePreKeyWhisperMessage(from, blob).catch(function(e) { + return protocolInstance.handlePreKeyWhisperMessage(from, blob).catch(function(e) { if (e.message === 'Unknown identity key') { blob.reset(); // restore the version byte.