Bullet-proof _setVerified and handleDataMessage against rejections

And the weird behavior we get from $.Deferred.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-13 10:07:18 -07:00
parent 5da324103a
commit 4da1722ee8
2 changed files with 41 additions and 14 deletions

View file

@ -128,7 +128,9 @@
var keychange;
return promise.then(function(updatedKey) {
keychange = updatedKey;
return this.save({verified: verified});
return new Promise(function(resolve) {
return this.save({verified: verified}).always(resolve);
}.bind(this));
}.bind(this)).then(function() {
// Three situations result in a verification notice in the conversation:
// 1) The message came from an explicit verification in another client (not