From b1d370755aadf30bb8539c980e01bc88acb31ff8 Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 21 Apr 2016 16:45:21 -0700 Subject: [PATCH] Rename AxolotlStore // FREEBIE --- Gruntfile.js | 2 +- background.html | 2 +- js/libtextsecure.js | 2 +- js/{axolotl_store.js => signal_protocol_store.js} | 8 ++++---- libtextsecure/axolotl_wrapper.js | 2 +- ...xolotl_store.js => in_memory_signal_protocol_store.js} | 4 ++-- libtextsecure/test/index.html | 2 +- libtextsecure/test/message_receiver_test.js | 2 +- libtextsecure/test/storage_test.js | 2 +- test/index.html | 2 +- test/storage_test.js | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) rename js/{axolotl_store.js => signal_protocol_store.js} (98%) rename libtextsecure/test/{in_memory_axolotl_store.js => in_memory_signal_protocol_store.js} (98%) diff --git a/Gruntfile.js b/Gruntfile.js index 5ff2f110..beca1267 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -88,7 +88,7 @@ module.exports = function(grunt) { '!js/libtextsecure.js', '!js/libaxolotl-worker.js', '!js/components.js', - '!js/axolotl_store.js', + '!js/signal_protocol_store.js', '_locales/**/*' ], options: { jshintrc: '.jshintrc' }, diff --git a/background.html b/background.html index 0a4b3562..ceec2692 100644 --- a/background.html +++ b/background.html @@ -391,7 +391,7 @@ - + diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 9c34149f..2de1e16e 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -35296,7 +35296,7 @@ axolotlInternal.RecipientRecord = function() { window.textsecure = window.textsecure || {}; window.textsecure.storage = window.textsecure.storage || {}; - textsecure.storage.axolotl = new AxolotlStore(); + textsecure.storage.axolotl = new SignalProtocolStore(); var axolotlInstance = axolotl.protocol(textsecure.storage.axolotl); /* diff --git a/js/axolotl_store.js b/js/signal_protocol_store.js similarity index 98% rename from js/axolotl_store.js rename to js/signal_protocol_store.js index b576badd..3d3fd799 100644 --- a/js/axolotl_store.js +++ b/js/signal_protocol_store.js @@ -79,10 +79,10 @@ var Group = Model.extend({ storeName: 'groups' }); var Item = Model.extend({ storeName: 'items' }); - function AxolotlStore() {} + function SignalProtocolStore() {} - AxolotlStore.prototype = { - constructor: AxolotlStore, + SignalProtocolStore.prototype = { + constructor: SignalProtocolStore, getIdentityKeyPair: function() { var item = new Item({id: 'identityKey'}); return new Promise(function(resolve) { @@ -330,5 +330,5 @@ }; - window.AxolotlStore = AxolotlStore; + window.SignalProtocolStore = SignalProtocolStore; })(); diff --git a/libtextsecure/axolotl_wrapper.js b/libtextsecure/axolotl_wrapper.js index 5f0d4f3d..43c939d5 100644 --- a/libtextsecure/axolotl_wrapper.js +++ b/libtextsecure/axolotl_wrapper.js @@ -6,7 +6,7 @@ window.textsecure = window.textsecure || {}; window.textsecure.storage = window.textsecure.storage || {}; - textsecure.storage.axolotl = new AxolotlStore(); + textsecure.storage.axolotl = new SignalProtocolStore(); var axolotlInstance = axolotl.protocol(textsecure.storage.axolotl); /* diff --git a/libtextsecure/test/in_memory_axolotl_store.js b/libtextsecure/test/in_memory_signal_protocol_store.js similarity index 98% rename from libtextsecure/test/in_memory_axolotl_store.js rename to libtextsecure/test/in_memory_signal_protocol_store.js index a4020ca4..84039ac9 100644 --- a/libtextsecure/test/in_memory_axolotl_store.js +++ b/libtextsecure/test/in_memory_signal_protocol_store.js @@ -1,8 +1,8 @@ -function AxolotlStore() { +function SignalProtocolStore() { this.store = {}; } -AxolotlStore.prototype = { +SignalProtocolStore.prototype = { getIdentityKeyPair: function() { return Promise.resolve(this.get('identityKey')); }, diff --git a/libtextsecure/test/index.html b/libtextsecure/test/index.html index e6d935ad..46027b34 100644 --- a/libtextsecure/test/index.html +++ b/libtextsecure/test/index.html @@ -14,7 +14,7 @@ - + diff --git a/libtextsecure/test/message_receiver_test.js b/libtextsecure/test/message_receiver_test.js index aac8b921..55e23803 100644 --- a/libtextsecure/test/message_receiver_test.js +++ b/libtextsecure/test/message_receiver_test.js @@ -3,7 +3,7 @@ */ describe('MessageReceiver', function() { - textsecure.storage.impl = new AxolotlStore(); + textsecure.storage.impl = new SignalProtocolStore(); var WebSocket = window.WebSocket; var number = '+19999999999'; var deviceId = 1; diff --git a/libtextsecure/test/storage_test.js b/libtextsecure/test/storage_test.js index 6664615f..a5db0fa2 100644 --- a/libtextsecure/test/storage_test.js +++ b/libtextsecure/test/storage_test.js @@ -4,7 +4,7 @@ 'use strict'; -describe("AxolotlStore", function() { +describe("SignalProtocolStore", function() { before(function() { localStorage.clear(); }); var store = textsecure.storage.axolotl; var identifier = '+5558675309'; diff --git a/test/index.html b/test/index.html index e64a3d9f..1b079da5 100644 --- a/test/index.html +++ b/test/index.html @@ -104,7 +104,7 @@ - + diff --git a/test/storage_test.js b/test/storage_test.js index 125def19..7ecf4d13 100644 --- a/test/storage_test.js +++ b/test/storage_test.js @@ -4,7 +4,7 @@ 'use strict'; -describe("AxolotlStore", function() { +describe("SignalProtocolStore", function() { before(function(done) { storage.put('registrationId', 1337); storage.put('identityKey', identityKey);