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);