From 67d13e9ba8b83a3c8398e9fd816709f6d3c0eb51 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 26 Jul 2021 17:00:16 -0700 Subject: [PATCH] More logging in addDeliveryIssue, properly wait in getProfiles --- ts/background.ts | 3 ++- ts/models/conversations.ts | 10 ++++++---- ts/util/handleRetry.ts | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index 4d0c1b8c83..7110b0454d 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -944,7 +944,7 @@ export async function startApp(): Promise { `retryPlaceholders/interval: Found ${expired.length} expired items` ); expired.forEach(item => { - const { conversationId, senderUuid } = item; + const { conversationId, senderUuid, sentAt } = item; const conversation = window.ConversationController.get( conversationId ); @@ -956,6 +956,7 @@ export async function startApp(): Promise { receivedAt, receivedAtCounter, senderUuid, + sentAt, }) ); } diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 6cd3b69f07..5b4e5b9a56 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -2466,13 +2466,15 @@ export class ConversationModel extends window.Backbone receivedAt, receivedAtCounter, senderUuid, + sentAt, }: { receivedAt: number; receivedAtCounter: number; senderUuid: string; + sentAt: number; }): Promise { window.log.info(`addDeliveryIssue: adding for ${this.idForLogging()}`, { - receivedAt, + sentAt, senderUuid, }); @@ -4379,9 +4381,9 @@ export class ConversationModel extends window.Backbone // request all conversation members' keys const conversations = (this.getMembers() as unknown) as Array; return Promise.all( - window._.map(conversations, conversation => { - getProfile(conversation.get('uuid'), conversation.get('e164')); - }) + window._.map(conversations, conversation => + getProfile(conversation.get('uuid'), conversation.get('e164')) + ) ); } diff --git a/ts/util/handleRetry.ts b/ts/util/handleRetry.ts index b7b0b71f20..86862e6403 100644 --- a/ts/util/handleRetry.ts +++ b/ts/util/handleRetry.ts @@ -472,6 +472,7 @@ async function requestResend(decryptionError: DecryptionErrorEventData) { receivedAt: receivedAtDate, receivedAtCounter, senderUuid, + sentAt: timestamp, }); }); }