From a3334ee4e7c36af8f552416859a3968e5f65168d Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 27 Apr 2026 14:28:56 +0200 Subject: [PATCH] Pin Message: Fix pin icon update inside message bubble (#6860) --- src/global/actions/apiUpdaters/messages.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/global/actions/apiUpdaters/messages.ts b/src/global/actions/apiUpdaters/messages.ts index 30d3c3fb9..dc7635f30 100644 --- a/src/global/actions/apiUpdaters/messages.ts +++ b/src/global/actions/apiUpdaters/messages.ts @@ -633,6 +633,11 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => { case 'updatePinnedIds': { const { chatId, isPinned, messageIds } = update; + const shouldBePinned = Boolean(isPinned); + + messageIds.forEach((id) => { + global = updateChatMessage(global, chatId, id, { isPinned: shouldBePinned }); + }); const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, messageIds, false);