From 03c6e793024928e6055fc4bb2bd61cecc84a4c31 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 4 Sep 2023 04:05:32 +0200 Subject: [PATCH] Emoji Effect: Fix duplicate keys error (#3782) --- src/global/actions/apiUpdaters/messages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global/actions/apiUpdaters/messages.ts b/src/global/actions/apiUpdaters/messages.ts index f1c802eb0..6aedad4ec 100644 --- a/src/global/actions/apiUpdaters/messages.ts +++ b/src/global/actions/apiUpdaters/messages.ts @@ -158,7 +158,7 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => { const tabState = selectTabState(global, tabId); global = updateTabState(global, { activeEmojiInteractions: [...(tabState.activeEmojiInteractions || []), { - id: tabState.activeEmojiInteractions?.length || 0, + id: Math.random(), animatedEffect: update.emoji, messageId: update.messageId, } as ActiveEmojiInteraction],