From 8d75fde012a60059c31b1af3ecfb11cb3b92730d Mon Sep 17 00:00:00 2001 From: Warrick Corfe-Tan Date: Fri, 8 Oct 2021 13:57:25 +1100 Subject: [PATCH] yarn ready changes --- ts/receiver/queuedJob.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/receiver/queuedJob.ts b/ts/receiver/queuedJob.ts index 00c0ddb5c..794edaae0 100644 --- a/ts/receiver/queuedJob.ts +++ b/ts/receiver/queuedJob.ts @@ -227,7 +227,7 @@ function updateReadStatus(message: MessageModel, conversation: ConversationModel } } -function handleSyncedReceipts(message: MessageModel, conversation: ConversationModel) { +async function handleSyncedReceipts(message: MessageModel, conversation: ConversationModel) { const readReceipts = window.Whisper.ReadReceipts.forMessage(conversation, message); if (readReceipts.length) { const readBy = readReceipts.map((receipt: any) => receipt.get('reader')); @@ -249,7 +249,7 @@ function handleSyncedReceipts(message: MessageModel, conversation: ConversationM // If the newly received message is from us, we assume that we've seen the messages up until that point const sentTimestamp = message.get('sent_at'); if (sentTimestamp) { - conversation.markRead(sentTimestamp); + await conversation.markRead(sentTimestamp); } } @@ -318,7 +318,7 @@ async function handleRegularMessage( } if (type === 'outgoing') { - handleSyncedReceipts(message, conversation); + await handleSyncedReceipts(message, conversation); } const conversationActiveAt = conversation.get('active_at');