From 77a8b2ce3e4856cafc69db06569bbebbd9b2790b Mon Sep 17 00:00:00 2001 From: Kristina Date: Fri, 10 May 2024 19:13:01 +0400 Subject: [PATCH] Fix multiple channel read while data is updating (#5576) Signed-off-by: Kristina Fefelova --- plugins/chunter-resources/src/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/chunter-resources/src/utils.ts b/plugins/chunter-resources/src/utils.ts index 6bb5907ffe..a5e861ad4a 100644 --- a/plugins/chunter-resources/src/utils.ts +++ b/plugins/chunter-resources/src/utils.ts @@ -390,6 +390,7 @@ export async function readChannelMessages ( const lastTimestamp = messages[messages.length - 1].createdOn ?? 0 if ((context.lastViewedTimestamp ?? 0) < lastTimestamp) { + context.lastViewedTimestamp = lastTimestamp void client.update(context, { lastViewedTimestamp: lastTimestamp }) } }