Apply fix for group chats
This commit is contained in:
parent
7667231137
commit
56710fee39
|
@ -9219,7 +9219,6 @@ jQuery(async function () {
|
||||||
if (selected_group) {
|
if (selected_group) {
|
||||||
await createNewGroupChat(selected_group);
|
await createNewGroupChat(selected_group);
|
||||||
if (isDelChatCheckbox) await deleteGroupChat(selected_group, chat_file_for_del);
|
if (isDelChatCheckbox) await deleteGroupChat(selected_group, chat_file_for_del);
|
||||||
await eventSource.emit(event_types.GROUP_CHAT_CREATED);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//RossAscends: added character name to new chat filenames and replaced Date.now() with humanizedDateTime;
|
//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 group = groups.find((x) => x.id === groupId);
|
||||||
const chat_id = group.chat_id;
|
const chat_id = group.chat_id;
|
||||||
const data = await loadGroupChat(chat_id);
|
const data = await loadGroupChat(chat_id);
|
||||||
|
let freshChat = false;
|
||||||
|
|
||||||
await loadItemizedPrompts(getCurrentChatId());
|
await loadItemizedPrompts(getCurrentChatId());
|
||||||
|
|
||||||
|
@ -216,6 +217,7 @@ export async function getGroupChat(groupId, reload = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await saveGroupChat(groupId, false);
|
await saveGroupChat(groupId, false);
|
||||||
|
freshChat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group) {
|
if (group) {
|
||||||
|
@ -228,6 +230,7 @@ export async function getGroupChat(groupId, reload = false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
await eventSource.emit(event_types.CHAT_CHANGED, getCurrentChatId());
|
await eventSource.emit(event_types.CHAT_CHANGED, getCurrentChatId());
|
||||||
|
if (freshChat) await eventSource.emit(event_types.GROUP_CHAT_CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue