Check trust store for latest identity key info before sending

We definitely want the latest information from our local database before
attempting to send.

FREEBIE
pull/749/head
Scott Nonnenberg 8 years ago
parent fc39241003
commit 782c484680

@ -705,18 +705,22 @@
options = options || {}; options = options || {};
_.defaults(options, {force: false}); _.defaults(options, {force: false});
var contacts = this.model.getUnverified(); // This will go to the trust store for the latest identity key information,
if (!contacts.length) { // and may result in the display of a new banner for this conversation.
return this.checkUntrustedSendMessage(e, options); this.model.updateVerified().then(function() {
} var contacts = this.model.getUnverified();
if (!contacts.length) {
return this.checkUntrustedSendMessage(e, options);
}
if (options.force) { if (options.force) {
return this.markAllAsVerifiedDefault(contacts).then(function() { return this.markAllAsVerifiedDefault(contacts).then(function() {
this.checkUnverifiedSendMessage(e, options); this.checkUnverifiedSendMessage(e, options);
}.bind(this)); }.bind(this));
} }
this.showSendConfirmationDialog(e, contacts); this.showSendConfirmationDialog(e, contacts);
}.bind(this));
}, },
checkUntrustedSendMessage: function(e, options) { checkUntrustedSendMessage: function(e, options) {

Loading…
Cancel
Save