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
This commit is contained in:
parent
fc39241003
commit
782c484680
1 changed files with 14 additions and 10 deletions
|
@ -705,18 +705,22 @@
|
|||
options = options || {};
|
||||
_.defaults(options, {force: false});
|
||||
|
||||
var contacts = this.model.getUnverified();
|
||||
if (!contacts.length) {
|
||||
return this.checkUntrustedSendMessage(e, options);
|
||||
}
|
||||
// This will go to the trust store for the latest identity key information,
|
||||
// and may result in the display of a new banner for this conversation.
|
||||
this.model.updateVerified().then(function() {
|
||||
var contacts = this.model.getUnverified();
|
||||
if (!contacts.length) {
|
||||
return this.checkUntrustedSendMessage(e, options);
|
||||
}
|
||||
|
||||
if (options.force) {
|
||||
return this.markAllAsVerifiedDefault(contacts).then(function() {
|
||||
this.checkUnverifiedSendMessage(e, options);
|
||||
}.bind(this));
|
||||
}
|
||||
if (options.force) {
|
||||
return this.markAllAsVerifiedDefault(contacts).then(function() {
|
||||
this.checkUnverifiedSendMessage(e, options);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
this.showSendConfirmationDialog(e, contacts);
|
||||
this.showSendConfirmationDialog(e, contacts);
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
checkUntrustedSendMessage: function(e, options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue