Resolve conflicts one at a time
Previously, with a mix of text and media messages in conflict, asynchronous callbacks aligned so as to fail to remove some of the conflict objects on messages. Fix by serializing conflict processing, but making sure to move on through the message list even if some conflict resolutions fail. Fixes #370 // FREEBIE
This commit is contained in:
parent
4c4b875348
commit
9c8933c3d0
2 changed files with 7 additions and 6 deletions
|
@ -199,7 +199,6 @@
|
|||
resolveConflict: function(number) {
|
||||
var error = this.getKeyConflict(number);
|
||||
if (error) {
|
||||
this.removeConflictFor(number);
|
||||
var promise = new textsecure.ReplayableError(error).replay();
|
||||
if (this.isIncoming()) {
|
||||
promise = promise.then(function(dataMessage) {
|
||||
|
@ -207,6 +206,7 @@
|
|||
}.bind(this));
|
||||
} else {
|
||||
promise = promise.then(function() {
|
||||
this.removeConflictFor(number);
|
||||
this.save();
|
||||
}.bind(this));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue