MessageReceiver: Don't wait for cache update to move forward
This commit is contained in:
parent
28f96fe893
commit
2c3847affe
1 changed files with 10 additions and 11 deletions
|
@ -801,19 +801,18 @@ MessageReceiver.prototype.extend({
|
||||||
.then(plaintext => {
|
.then(plaintext => {
|
||||||
const { isMe, isBlocked } = plaintext || {};
|
const { isMe, isBlocked } = plaintext || {};
|
||||||
if (isMe || isBlocked) {
|
if (isMe || isBlocked) {
|
||||||
return this.removeFromCache(envelope);
|
this.removeFromCache(envelope);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.updateCache(envelope, plaintext).then(
|
this.updateCache(envelope, plaintext).catch(error => {
|
||||||
() => plaintext,
|
window.log.error(
|
||||||
error => {
|
'decrypt failed to save decrypted message contents to cache:',
|
||||||
window.log.error(
|
error && error.stack ? error.stack : error
|
||||||
'decrypt failed to save decrypted message contents to cache:',
|
);
|
||||||
error && error.stack ? error.stack : error
|
});
|
||||||
);
|
|
||||||
return plaintext;
|
return plaintext;
|
||||||
}
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
let errorToThrow = error;
|
let errorToThrow = error;
|
||||||
|
|
Loading…
Add table
Reference in a new issue