From 94f318ea0822772e4e1a0e4a0f60ebb6efedd500 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Tue, 8 Nov 2022 17:33:25 -0800 Subject: [PATCH] Add extra check to markConversationRead --- ts/util/markConversationRead.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ts/util/markConversationRead.ts b/ts/util/markConversationRead.ts index f41c8a847..c5be57a7f 100644 --- a/ts/util/markConversationRead.ts +++ b/ts/util/markConversationRead.ts @@ -13,6 +13,7 @@ import { tapToViewMessagesDeletionService } from '../services/tapToViewMessagesD import { isGroup, isDirectConversation } from './whatTypeOfConversation'; import * as log from '../logging/log'; import { getConversationIdForLogging } from './idForLogging'; +import { isConversationAccepted } from './isConversationAccepted'; import { ReadStatus } from '../messages/MessageReadStatus'; export async function markConversationRead( @@ -134,10 +135,12 @@ export async function markConversationRead( readSyncJobQueue.add({ readSyncs }); } - await readReceiptsJobQueue.addIfAllowedByUser( - window.storage, - allReadMessagesSync - ); + if (isConversationAccepted(conversationAttrs)) { + await readReceiptsJobQueue.addIfAllowedByUser( + window.storage, + allReadMessagesSync + ); + } } expiringMessagesDeletionService.update();