Async remove identity

This commit is contained in:
lilia 2015-04-09 14:58:26 -07:00
parent 26f1aa4db5
commit 71715c95bc
4 changed files with 12 additions and 12 deletions

View file

@ -241,12 +241,13 @@
throw 'No conflicts to resolve';
}
textsecure.storage.devices.removeIdentityKeyForNumber(number);
this.messageCollection.each(function(message) {
if (message.hasKeyConflict(number)) {
message.resolveConflict(number);
}
});
return textsecure.storage.devices.removeIdentityKeyForNumber(number).then(function() {
this.messageCollection.each(function(message) {
if (message.hasKeyConflict(number)) {
message.resolveConflict(number);
}
});
}.bind(this));
}
});