MessageReceiver: Don't wait for cache update to move forward
This commit is contained in:
@@ -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,
|
|
||||||
error => {
|
|
||||||
window.log.error(
|
window.log.error(
|
||||||
'decrypt failed to save decrypted message contents to cache:',
|
'decrypt failed to save decrypted message contents to cache:',
|
||||||
error && error.stack ? error.stack : error
|
error && error.stack ? error.stack : error
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
||||||
return plaintext;
|
return plaintext;
|
||||||
}
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
let errorToThrow = error;
|
let errorToThrow = error;
|
||||||
|
Reference in New Issue
Block a user