Fix new chat reference not getting saved when starting a new chat

This commit is contained in:
Cohee 2023-08-24 00:54:36 +03:00
parent de0dbfb394
commit d64c5880c8

View File

@ -7478,14 +7478,15 @@ $(document).ready(function () {
chat.length = 0; chat.length = 0;
if (selected_group) { if (selected_group) {
createNewGroupChat(selected_group); await createNewGroupChat(selected_group);
} }
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;
chat_metadata = {}; chat_metadata = {};
characters[this_chid].chat = name2 + " - " + humanizedDateTime(); characters[this_chid].chat = name2 + " - " + humanizedDateTime();
$("#selected_chat_pole").val(characters[this_chid].chat); $("#selected_chat_pole").val(characters[this_chid].chat);
getChat(); await getChat();
await createOrEditCharacter();
} }
} }