From 5e63d8aadfa3bac350e2ca07fd48c03f3ff2c9be Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Wed, 5 Oct 2022 13:49:43 -0700 Subject: [PATCH] Pipe device number through for sync'd sent story messages --- ts/background.ts | 15 +++++---------- ts/textsecure/MessageReceiver.ts | 3 ++- ts/util/onStoryRecipientUpdate.ts | 1 + 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index 1cba57be3..c3eb99378 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -3669,11 +3669,8 @@ export async function startApp(): Promise { ); log.info( logTitle, - source, - sourceUuid, - sourceDevice, + `${sourceUuid || source}.${sourceDevice}`, envelopeTimestamp, - sourceConversation?.id, 'for sent message', timestamp ); @@ -3805,17 +3802,15 @@ export async function startApp(): Promise { log.info( 'delivery receipt from', - source, - sourceUuid, - sourceDevice, - sourceConversation?.id, + `${sourceUuid || source}.${sourceDevice}`, envelopeTimestamp, 'for sent message', - timestamp + timestamp, + `wasSentEncrypted=${wasSentEncrypted}` ); if (!sourceConversation) { - log.info('no conversation for', source, sourceUuid); + log.info('onDeliveryReceipt: no conversation for', source, sourceUuid); return; } diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index a405184d7..c594df945 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -1447,7 +1447,7 @@ export default class MessageReceiver new DeliveryEvent( { timestamp: envelope.timestamp, - envelopeTimestamp: envelope.serverTimestamp, + envelopeTimestamp: envelope.timestamp, source: envelope.source, sourceUuid: envelope.sourceUuid, sourceDevice: envelope.sourceDevice, @@ -1974,6 +1974,7 @@ export default class MessageReceiver const ev = new SentEvent( { destinationUuid: envelope.destinationUuid.toString(), + device: envelope.sourceDevice, isRecipientUpdate: Boolean(sentMessage.isRecipientUpdate), message, receivedAtCounter: envelope.receivedAtCounter, diff --git a/ts/util/onStoryRecipientUpdate.ts b/ts/util/onStoryRecipientUpdate.ts index 6df2eb28a..c544e6fca 100644 --- a/ts/util/onStoryRecipientUpdate.ts +++ b/ts/util/onStoryRecipientUpdate.ts @@ -26,6 +26,7 @@ export async function onStoryRecipientUpdate( const conversation = window.ConversationController.get(destinationUuid); if (!conversation) { + log.info(`onStoryRecipientUpdate no conversation for ${destinationUuid}`); return; }