MessageReceiver: Use UUID if we have it
This commit is contained in:
parent
8e656c2cf1
commit
9f73b40d7a
4 changed files with 10 additions and 5 deletions
|
@ -211,6 +211,7 @@ function applyMessageRequestState(
|
|||
}
|
||||
|
||||
type RecordClassObject = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
|
|
|
@ -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<any> = 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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue