Chat: Fix missing thread info in update (#6648)
This commit is contained in:
parent
d0ba0c2530
commit
2ccbe341e2
@ -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,
|
||||
|
||||
@ -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)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user