fix closed conversation messages
This commit is contained in:
@@ -440,6 +440,8 @@ function AiChatPage() {
|
||||
setMessages([]);
|
||||
setError(null);
|
||||
setBotTyping(false);
|
||||
await Promise.all([fetchConversation(convId), fetchMessages(convId)]);
|
||||
connectStomp(convId);
|
||||
router.replace(`/ai-chat?id=${convId}`, { scroll: false });
|
||||
}
|
||||
|
||||
|
||||
@@ -422,6 +422,10 @@ function ChatPage() {
|
||||
if (stompRef.current) { stompRef.current.deactivate(); stompRef.current = null; }
|
||||
setMessages([]);
|
||||
setError(null);
|
||||
setSwitchingConv(true);
|
||||
await Promise.all([fetchConversation(convId), fetchMessages(convId)]);
|
||||
setSwitchingConv(false);
|
||||
connectStomp(convId);
|
||||
router.replace(`/chat?id=${convId}`, { scroll: false });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user