diff --git a/js/background.js b/js/background.js index 921c0f3da6..581f662369 100644 --- a/js/background.js +++ b/js/background.js @@ -2663,12 +2663,16 @@ let sentTo = []; if (data.unidentifiedStatus && data.unidentifiedStatus.length) { - sentTo = data.unidentifiedStatus.map(item => item.destination); + sentTo = data.unidentifiedStatus.map( + item => item.destinationUuid || item.destination + ); const unidentified = _.filter(data.unidentifiedStatus, item => Boolean(item.unidentified) ); // eslint-disable-next-line no-param-reassign - data.unidentifiedDeliveries = unidentified.map(item => item.destination); + data.unidentifiedDeliveries = unidentified.map( + item => item.destinationUuid || item.destination + ); } return new Whisper.Message({ diff --git a/js/modules/metadata/SecretSessionCipher.js b/js/modules/metadata/SecretSessionCipher.js index c713f7b17a..d4d7aa82de 100644 --- a/js/modules/metadata/SecretSessionCipher.js +++ b/js/modules/metadata/SecretSessionCipher.js @@ -517,7 +517,7 @@ SecretSessionCipher.prototype = { const signalProtocolStore = this.storage; const sender = new libsignal.SignalProtocolAddress( - message.senderCertificate.sender || message.senderCertificate.senderUuid, + message.senderCertificate.senderUuid || message.senderCertificate.sender, message.senderCertificate.senderDevice ); diff --git a/ts/services/storageRecordOps.ts b/ts/services/storageRecordOps.ts index 84442f4a7a..f44485706f 100644 --- a/ts/services/storageRecordOps.ts +++ b/ts/services/storageRecordOps.ts @@ -211,6 +211,7 @@ function applyMessageRequestState( } type RecordClassObject = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; }; diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index 130060a5ea..17d77ece0d 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -839,7 +839,7 @@ class MessageReceiverInner extends EventTarget { let address: SignalProtocolAddressClass; let promise; - const identifier = envelope.source || envelope.sourceUuid; + const identifier = envelope.sourceUuid || envelope.source; address = new window.libsignal.SignalProtocolAddress( // Using source as opposed to sourceUuid allows us to get the existing @@ -1140,7 +1140,7 @@ class MessageReceiverInner extends EventTarget { window.log.info('data message from', this.getEnvelopeId(envelope)); let p: Promise = Promise.resolve(); // eslint-disable-next-line no-bitwise - const destination = envelope.source || envelope.sourceUuid; + const destination = envelope.sourceUuid || envelope.source; if (!destination) { throw new Error( 'MessageReceiver.handleDataMessage: source and sourceUuid were falsey'