From 12d9bb61c302e4fb9df5884b721a3bd93f5989ed Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 13 Jun 2017 13:40:09 -0700 Subject: [PATCH] Let removeIdentityKey delete the entire record Previously we would only clear the publicKey since that was the only attribute, but now we should delete the entire record. This method is currently only called from tests. // FREEBIE --- js/signal_protocol_store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/signal_protocol_store.js b/js/signal_protocol_store.js index 4aa5f8755..52297dc86 100644 --- a/js/signal_protocol_store.js +++ b/js/signal_protocol_store.js @@ -562,7 +562,7 @@ return new Promise(function(resolve, reject) { var identityKey = new IdentityKey({id: number}); identityKey.fetch().then(function() { - identityKey.save({publicKey: undefined}); + identityKey.destroy(); }).fail(function() { reject(new Error("Tried to remove identity for unknown number")); });