From d930ec1aa0cd1294d61c7d30de762da98700d290 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Thu, 7 Mar 2024 12:23:51 +0100 Subject: [PATCH] fix(conversation): skip unread marker increasing from notification, if already done Signed-off-by: Maksim Sukharev --- src/store/conversationsStore.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/store/conversationsStore.js b/src/store/conversationsStore.js index 95f69899946..5bd18be6188 100644 --- a/src/store/conversationsStore.js +++ b/src/store/conversationsStore.js @@ -673,6 +673,11 @@ const actions = { } const conversation = Object.assign({}, getters.conversations[token]) + if (conversation.lastMessage.id === parseInt(messageId, 10) + || conversation.lastMessage.timestamp >= Date.parse(notification.datetime) / 1000) { + // Already updated from other source, skipping + return + } const actor = notification.subjectRichParameters.user || notification.subjectRichParameters.guest || { type: 'guest',