Improve sealed sender icon display logic

This commit is contained in:
Scott Nonnenberg 2018-11-29 14:13:54 -08:00
parent 313d08344a
commit 822ea9ae53
2 changed files with 9 additions and 5 deletions

View File

@ -466,7 +466,7 @@ MessageReceiver.prototype.extend({
window.log.info('getAllFromCache');
const count = await textsecure.storage.unprocessed.getCount();
if (count > 250) {
if (count > 1500) {
await textsecure.storage.unprocessed.removeAll();
window.log.warn(
`There were ${count} messages in cache. Deleted all instead of reprocessing`
@ -719,12 +719,14 @@ MessageReceiver.prototype.extend({
// Here we take this sender information and attach it back to the envelope
// to make the rest of the app work properly.
const originalSource = envelope.source;
// eslint-disable-next-line no-param-reassign
envelope.source = sender.getName();
// eslint-disable-next-line no-param-reassign
envelope.sourceDevice = sender.getDeviceId();
// eslint-disable-next-line no-param-reassign
envelope.unidentifiedDeliveryReceived = true;
envelope.unidentifiedDeliveryReceived = !originalSource;
// Return just the content because that matches the signature of the other
// decrypt methods used above.
@ -734,12 +736,14 @@ MessageReceiver.prototype.extend({
const { sender } = error || {};
if (sender) {
const originalSource = envelope.source;
// eslint-disable-next-line no-param-reassign
envelope.source = sender.getName();
// eslint-disable-next-line no-param-reassign
envelope.sourceDevice = sender.getDeviceId();
// eslint-disable-next-line no-param-reassign
envelope.unidentifiedDeliveryReceived = true;
envelope.unidentifiedDeliveryReceived = !originalSource;
throw error;
}

View File

@ -2352,7 +2352,7 @@
"rule": "jQuery-wrap(",
"path": "libtextsecure/message_receiver.js",
"line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);",
"lineNumber": 781,
"lineNumber": 785,
"reasonCategory": "falseMatch",
"updated": "2018-09-19T18:13:29.628Z"
},
@ -2360,7 +2360,7 @@
"rule": "jQuery-wrap(",
"path": "libtextsecure/message_receiver.js",
"line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);",
"lineNumber": 806,
"lineNumber": 810,
"reasonCategory": "falseMatch",
"updated": "2018-09-19T18:13:29.628Z"
},