Comments: Fix first message id on send (#6209)
This commit is contained in:
parent
1447bfac27
commit
2f11ce4778
@ -412,14 +412,19 @@ addActionHandler('openThread', async (global, actions, payload): Promise<void> =
|
|||||||
threadId,
|
threadId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const lastMessageId = threadInfo?.lastMessageId !== undefined ? threadInfo.lastMessageId
|
||||||
|
: threadInfo?.messagesCount === 0 ? result.threadId : undefined;
|
||||||
|
|
||||||
global = updateThreadInfo(global, chatId, threadId, {
|
global = updateThreadInfo(global, chatId, threadId, {
|
||||||
isCommentsInfo: false,
|
isCommentsInfo: false,
|
||||||
threadId,
|
threadId,
|
||||||
chatId,
|
chatId,
|
||||||
fromChannelId: loadingChatId,
|
fromChannelId: loadingChatId,
|
||||||
fromMessageId: loadingThreadId,
|
fromMessageId: loadingThreadId,
|
||||||
|
lastMessageId,
|
||||||
...(threadInfo
|
...(threadInfo
|
||||||
&& pick(threadInfo, ['messagesCount', 'lastMessageId', 'lastReadInboxMessageId', 'recentReplierIds'])),
|
&& pick(threadInfo, ['messagesCount', 'lastReadInboxMessageId', 'recentReplierIds'])
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
global = updateThread(global, chatId, threadId, {
|
global = updateThread(global, chatId, threadId, {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user