From 475807c4aef6ff8778273bd35a1dd13a2aac5c0d Mon Sep 17 00:00:00 2001 From: William Grant Date: Mon, 25 Sep 2023 16:07:49 +1000 Subject: [PATCH] fix: remove redundant start timestamp start in read receipts --- ts/util/readReceipts.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ts/util/readReceipts.ts b/ts/util/readReceipts.ts index e974f9474..474153288 100644 --- a/ts/util/readReceipts.ts +++ b/ts/util/readReceipts.ts @@ -44,7 +44,6 @@ async function onReadReceipt(receipt: { source: string; timestamp: number; readA // readBy is only used for private conversations // we do not care of who read it. If the length is > 0 , it is read and false otherwise let readBy = message.get('read_by') || []; - const expirationStartTimestamp = message.get('expirationStartTimestamp') || undefined; if (!readBy.length) { readBy.push(receipt.source); @@ -55,17 +54,10 @@ async function onReadReceipt(receipt: { source: string; timestamp: number; readA message.set({ read_by: readBy, - expirationStartTimestamp, sent: true, }); - // TODO this needs verification through qa once merged that it works - if (message.isExpiring() && !expirationStartTimestamp) { - // This will save the message for us while starting the timer - await message.setToExpire(); - } else { - await message.commit(); - } + await message.commit(); // notify frontend listeners const conversation = getConversationController().get(message.get('conversationId'));