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

@@ -131,7 +131,7 @@ window.textsecure.messaging = function() {
var message = new Whisper.MessageCollection().add({id: message_id});
message.fetch().then(function() {
//TODO: Encapsuate with the rest of textsecure.storage.devices
textsecure.storage.removeEncrypted("devices" + number);
textsecure.storage.devices.removeIdentityKeyForNumber(number);
var proto = textsecure.protobuf.PushMessageContent.decode(encodedMessage, 'binary');
sendMessageProto(message.get('sent_at'), [number], proto, function(res) {
if (res.failure.length > 0)