mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
Fix multiple channel read while data is updating (#5576)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
b65dbd2d58
commit
77a8b2ce3e
@ -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 })
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user