MessageReceiver: Use UUID if we have it

This commit is contained in:
Scott Nonnenberg 2020-09-25 07:20:36 -07:00 committed by GitHub
parent 8e656c2cf1
commit 9f73b40d7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View file

@ -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({

View file

@ -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
);