Miscellaneous wire-up to ensure that failures propagate
FREEBIE
This commit is contained in:
parent
293be5d9f6
commit
e91f2d0377
2 changed files with 5 additions and 5 deletions
|
@ -122,7 +122,7 @@
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
sendVerifySyncMessage: function(number, state) {
|
sendVerifySyncMessage: function(number, state) {
|
||||||
textsecure.storage.protocol.loadIdentityKey(number).then(function(key) {
|
return textsecure.storage.protocol.loadIdentityKey(number).then(function(key) {
|
||||||
return textsecure.messaging.syncVerification(number, state, key);
|
return textsecure.messaging.syncVerification(number, state, key);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -331,10 +331,10 @@
|
||||||
var promises = [];
|
var promises = [];
|
||||||
while (sessions.length > 0) {
|
while (sessions.length > 0) {
|
||||||
promises.push(new Promise(function(res) {
|
promises.push(new Promise(function(res) {
|
||||||
sessions.pop().destroy().then(res);
|
sessions.pop().destroy().then(res, res);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
Promise.all(promises).then(resolve);
|
Promise.all(promises).then(resolve, resolve);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -472,7 +472,7 @@
|
||||||
this.archiveSiblingSessions(identifier).then(function() {
|
this.archiveSiblingSessions(identifier).then(function() {
|
||||||
resolve(true);
|
resolve(true);
|
||||||
}, reject);
|
}, reject);
|
||||||
}.bind(this));
|
}.bind(this), reject);
|
||||||
} else if (this.isNonBlockingApprovalRequired(identityRecord)) {
|
} else if (this.isNonBlockingApprovalRequired(identityRecord)) {
|
||||||
console.log("Setting approval status...");
|
console.log("Setting approval status...");
|
||||||
identityRecord.save({
|
identityRecord.save({
|
||||||
|
@ -547,7 +547,7 @@
|
||||||
identityRecord.save({
|
identityRecord.save({
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
resolve();
|
resolve();
|
||||||
});
|
}, reject);
|
||||||
} else {
|
} else {
|
||||||
reject(identityRecord.validationError);
|
reject(identityRecord.validationError);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue