mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 02:47:52 +01:00
Apply fix for group chats
This commit is contained in:
parent
7667231137
commit
56710fee39
@ -9219,7 +9219,6 @@ jQuery(async function () {
|
||||
if (selected_group) {
|
||||
await createNewGroupChat(selected_group);
|
||||
if (isDelChatCheckbox) await deleteGroupChat(selected_group, chat_file_for_del);
|
||||
await eventSource.emit(event_types.GROUP_CHAT_CREATED);
|
||||
}
|
||||
else {
|
||||
//RossAscends: added character name to new chat filenames and replaced Date.now() with humanizedDateTime;
|
||||
|
@ -183,6 +183,7 @@ export async function getGroupChat(groupId, reload = false) {
|
||||
const group = groups.find((x) => x.id === groupId);
|
||||
const chat_id = group.chat_id;
|
||||
const data = await loadGroupChat(chat_id);
|
||||
let freshChat = false;
|
||||
|
||||
await loadItemizedPrompts(getCurrentChatId());
|
||||
|
||||
@ -216,6 +217,7 @@ export async function getGroupChat(groupId, reload = false) {
|
||||
}
|
||||
}
|
||||
await saveGroupChat(groupId, false);
|
||||
freshChat = true;
|
||||
}
|
||||
|
||||
if (group) {
|
||||
@ -228,6 +230,7 @@ export async function getGroupChat(groupId, reload = false) {
|
||||
}
|
||||
|
||||
await eventSource.emit(event_types.CHAT_CHANGED, getCurrentChatId());
|
||||
if (freshChat) await eventSource.emit(event_types.GROUP_CHAT_CREATED);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user