From 2ccbe341e2fc8d33591f595c7c7b8fbe8027b3c9 Mon Sep 17 00:00:00 2001 From: zubiden <19638254+zubiden@users.noreply.github.com> Date: Sun, 22 Feb 2026 23:42:57 +0100 Subject: [PATCH] Chat: Fix missing thread info in update (#6648) --- src/api/gramjs/methods/chats.ts | 6 ++++++ src/global/actions/api/chats.ts | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api/gramjs/methods/chats.ts b/src/api/gramjs/methods/chats.ts index 9e41fc095..7cf721e94 100644 --- a/src/api/gramjs/methods/chats.ts +++ b/src/api/gramjs/methods/chats.ts @@ -523,6 +523,7 @@ export async function requestChatUpdate({ const chatUpdate = buildApiChatFromDialog(dialog, peerEntity); const readState = buildThreadReadState(dialog); + const threadInfo = buildApiThreadInfoFromDialog(chat.id, dialog); sendApiUpdate({ '@type': 'updateThreadReadState', chatId: id, @@ -530,6 +531,11 @@ export async function requestChatUpdate({ readState, }); + sendApiUpdate({ + '@type': 'updateThreadInfo', + threadInfo, + }); + sendApiUpdate({ '@type': 'updateChat', id, diff --git a/src/global/actions/api/chats.ts b/src/global/actions/api/chats.ts index f2db7e6b1..15f2b417d 100644 --- a/src/global/actions/api/chats.ts +++ b/src/global/actions/api/chats.ts @@ -237,13 +237,14 @@ addActionHandler('openChat', (global, actions, payload): ActionReturnType => { } const chat = selectChat(global, id); + const threadInfo = selectThreadInfo(global, id, MAIN_THREAD_ID); const chatReadState = selectThreadReadState(global, id, MAIN_THREAD_ID); if (chatReadState?.hasUnreadMark) { actions.markChatRead({ id }); } - const isChatOnlySummary = !selectChatLastMessageId(global, id); + const isChatOnlySummary = !threadInfo || !selectChatLastMessageId(global, id); if (!chat) { if (selectIsChatWithSelf(global, id)) {