From fd8bd54de51aacd40d7fee0679389259559d9b17 Mon Sep 17 00:00:00 2001 From: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:51:41 -0700 Subject: [PATCH] Ensure new message in addCallHistory has all attributes --- ts/models/conversations.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 9377ee1db..eda9fd034 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -3284,18 +3284,19 @@ export class ConversationModel extends window.Backbone // awaited it would block on this forever. drop( this.queueJob('addCallHistory', async () => { - const message = { + const message: MessageAttributesType = { + id: generateGuid(), conversationId: this.id, type: 'call-history', sent_at: timestamp, + timestamp, received_at: receivedAtCounter || window.Signal.Util.incrementMessageCounter(), received_at_ms: timestamp, readStatus: unread ? ReadStatus.Unread : ReadStatus.Read, seenStatus: unread ? SeenStatus.Unseen : SeenStatus.NotApplicable, callHistoryDetails: detailsToSave, - // TODO: DESKTOP-722 - } as unknown as MessageAttributesType; + }; if (callHistoryDetails.callMode === CallMode.Direct) { const messageId =