From f4802952b6eb3547d8921588df8e45cf7dbb27c9 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Sat, 3 Jun 2023 02:43:16 +0300 Subject: [PATCH] Fix objectives transferring to new characters --- public/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index f9436646b..d8e59ae02 100644 --- a/public/script.js +++ b/public/script.js @@ -3582,10 +3582,11 @@ async function getChatResult() { printMessages(); select_selected_character(this_chid); + await eventSource.emit(event_types.CHAT_CHANGED, (getCurrentChatId())); + if (chat.length === 1) { await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1)); } - await eventSource.emit(event_types.CHAT_CHANGED, (getCurrentChatId())); } async function openCharacterChat(file_name) {