Improve sealed sender icon display logic
This commit is contained in:
parent
313d08344a
commit
822ea9ae53
2 changed files with 9 additions and 5 deletions
|
@ -466,7 +466,7 @@ MessageReceiver.prototype.extend({
|
||||||
window.log.info('getAllFromCache');
|
window.log.info('getAllFromCache');
|
||||||
const count = await textsecure.storage.unprocessed.getCount();
|
const count = await textsecure.storage.unprocessed.getCount();
|
||||||
|
|
||||||
if (count > 250) {
|
if (count > 1500) {
|
||||||
await textsecure.storage.unprocessed.removeAll();
|
await textsecure.storage.unprocessed.removeAll();
|
||||||
window.log.warn(
|
window.log.warn(
|
||||||
`There were ${count} messages in cache. Deleted all instead of reprocessing`
|
`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
|
// Here we take this sender information and attach it back to the envelope
|
||||||
// to make the rest of the app work properly.
|
// to make the rest of the app work properly.
|
||||||
|
|
||||||
|
const originalSource = envelope.source;
|
||||||
|
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
envelope.source = sender.getName();
|
envelope.source = sender.getName();
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
envelope.sourceDevice = sender.getDeviceId();
|
envelope.sourceDevice = sender.getDeviceId();
|
||||||
// eslint-disable-next-line no-param-reassign
|
// 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
|
// Return just the content because that matches the signature of the other
|
||||||
// decrypt methods used above.
|
// decrypt methods used above.
|
||||||
|
@ -734,12 +736,14 @@ MessageReceiver.prototype.extend({
|
||||||
const { sender } = error || {};
|
const { sender } = error || {};
|
||||||
|
|
||||||
if (sender) {
|
if (sender) {
|
||||||
|
const originalSource = envelope.source;
|
||||||
|
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
envelope.source = sender.getName();
|
envelope.source = sender.getName();
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
envelope.sourceDevice = sender.getDeviceId();
|
envelope.sourceDevice = sender.getDeviceId();
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
envelope.unidentifiedDeliveryReceived = true;
|
envelope.unidentifiedDeliveryReceived = !originalSource;
|
||||||
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2352,7 +2352,7 @@
|
||||||
"rule": "jQuery-wrap(",
|
"rule": "jQuery-wrap(",
|
||||||
"path": "libtextsecure/message_receiver.js",
|
"path": "libtextsecure/message_receiver.js",
|
||||||
"line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);",
|
"line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);",
|
||||||
"lineNumber": 781,
|
"lineNumber": 785,
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2018-09-19T18:13:29.628Z"
|
"updated": "2018-09-19T18:13:29.628Z"
|
||||||
},
|
},
|
||||||
|
@ -2360,7 +2360,7 @@
|
||||||
"rule": "jQuery-wrap(",
|
"rule": "jQuery-wrap(",
|
||||||
"path": "libtextsecure/message_receiver.js",
|
"path": "libtextsecure/message_receiver.js",
|
||||||
"line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);",
|
"line": " const buffer = dcodeIO.ByteBuffer.wrap(ciphertext);",
|
||||||
"lineNumber": 806,
|
"lineNumber": 810,
|
||||||
"reasonCategory": "falseMatch",
|
"reasonCategory": "falseMatch",
|
||||||
"updated": "2018-09-19T18:13:29.628Z"
|
"updated": "2018-09-19T18:13:29.628Z"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue