Add device storage method to wipe an identity

This commit is contained in:
lilia 2015-02-20 14:43:22 -08:00 committed by Matt Corallo
parent 45a053b3a8
commit 676ad04958
4 changed files with 18 additions and 6 deletions

View file

@ -93,8 +93,7 @@
var wipeIdentityAndTryMessageAgain = function(from, encodedMessage, message_id) {
// Wipe identity key!
//TODO: Encapsuate with the rest of textsecure.storage.devices
textsecure.storage.removeEncrypted("devices" + from.split('.')[0]);
textsecure.storage.devices.removeIdentityKeyForNumber(from.split('.')[0]);
//TODO: Probably breaks with a devicecontrol message
return axolotl.protocol.handlePreKeyWhisperMessage(from, encodedMessage).then(decodeMessageContents).then(
function(pushMessageContent) {