From a8a8d65e5b012393b9e197060998c8a4a4042785 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 18 Sep 2019 11:44:32 -0700 Subject: [PATCH] MessageReceiver: Add note about out-of-band updateCache calls --- libtextsecure/message_receiver.js | 2 ++ ts/util/lint/exceptions.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 6942dd0cc0..559259c73f 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -809,6 +809,8 @@ MessageReceiver.prototype.extend({ return null; } + // Note: this is an out of band update; there are cases where the item in the + // cache has already been deleted by the time this runs. That's okay. this.updateCache(envelope, plaintext).catch(error => { window.log.error( 'decrypt failed to save decrypted message contents to cache:', diff --git a/ts/util/lint/exceptions.json b/ts/util/lint/exceptions.json index 74107b39cf..7744ae7e14 100644 --- a/ts/util/lint/exceptions.json +++ b/ts/util/lint/exceptions.json @@ -1244,7 +1244,7 @@ "rule": "jQuery-wrap(", "path": "libtextsecure/message_receiver.js", "line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);", - "lineNumber": 827, + "lineNumber": 829, "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" }, @@ -1252,7 +1252,7 @@ "rule": "jQuery-wrap(", "path": "libtextsecure/message_receiver.js", "line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);", - "lineNumber": 852, + "lineNumber": 854, "reasonCategory": "falseMatch", "updated": "2018-09-19T18:13:29.628Z" },