From 4e21e783dbe4adc337dc9f990b5df2025e8c8385 Mon Sep 17 00:00:00 2001 From: lilia Date: Thu, 16 Feb 2017 19:32:12 -0800 Subject: [PATCH] Fix tests --- libtextsecure/test/in_memory_signal_protocol_store.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libtextsecure/test/in_memory_signal_protocol_store.js b/libtextsecure/test/in_memory_signal_protocol_store.js index 3156230f..92020be2 100644 --- a/libtextsecure/test/in_memory_signal_protocol_store.js +++ b/libtextsecure/test/in_memory_signal_protocol_store.js @@ -82,6 +82,17 @@ SignalProtocolStore.prototype = { resolve(res); }.bind(this)); }, + loadSignedPreKeys: function() { + return new Promise(function(resolve) { + var res = []; + for (var i in this.store) { + if (i.startsWith('25519KeysignedKey')) { + res.push(this.store[i]); + } + } + resolve(res); + }.bind(this)); + }, storeSignedPreKey: function(keyId, keyPair) { return new Promise(function(resolve) { resolve(this.put('25519KeysignedKey' + keyId, keyPair));