diff --git a/public/script.js b/public/script.js index 80d19eeb4..ba787581b 100644 --- a/public/script.js +++ b/public/script.js @@ -8612,7 +8612,6 @@ jQuery(async function () { } if (selected_group) { - //Fix it; When you're creating a new group chat (but not when initially converting from the existing regular chat), the first greeting message doesn't automatically get translated. await createNewGroupChat(selected_group); if (isDelChatCheckbox) await deleteGroupChat(selected_group, chat_file_for_del); } diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 57da890ee..27708edc5 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -189,6 +189,8 @@ export async function getGroupChat(groupId) { await printMessages(); } else { sendSystemMessage(system_message_types.GROUP, '', { isSmallSys: true }); + await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1)); + await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1)); if (group && Array.isArray(group.members)) { for (let member of group.members) { const character = characters.find(x => x.avatar === member || x.name === member); @@ -199,7 +201,9 @@ export async function getGroupChat(groupId) { const mes = await getFirstCharacterMessage(character); chat.push(mes); + await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1)); addOneMessage(mes); + await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1)); } } await saveGroupChat(groupId, false);