Fix tests

This commit is contained in:
lilia 2017-02-16 19:32:12 -08:00
parent cda22880a0
commit 4e21e783db

View file

@ -82,6 +82,17 @@ SignalProtocolStore.prototype = {
resolve(res); resolve(res);
}.bind(this)); }.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) { storeSignedPreKey: function(keyId, keyPair) {
return new Promise(function(resolve) { return new Promise(function(resolve) {
resolve(this.put('25519KeysignedKey' + keyId, keyPair)); resolve(this.put('25519KeysignedKey' + keyId, keyPair));