This commit is contained in:
RossAscends
2023-05-12 17:20:42 +09:00

View File

@@ -551,13 +551,13 @@ $.ajaxPrefilter((options, originalOptions, xhr) => {
///// initialization protocol ////////
$.get("/csrf-token").then(async (data) => {
token = data.token;
sendSystemMessage(system_message_types.WELCOME);
await readSecretState();
await getClientVersion();
await getSettings("def");
await getUserAvatars();
await getCharacters();
await getBackgrounds();
await getUserAvatars();
sendSystemMessage(system_message_types.WELCOME);
});
function checkOnlineStatus() {
@@ -1183,6 +1183,10 @@ function scrollChatToBottom() {
function substituteParams(content, _name1, _name2) {
_name1 = _name1 ?? name1;
_name2 = _name2 ?? name2;
if (!content) {
console.warn("No content on substituteParams")
return ''
}
content = content.replace(/{{user}}/gi, _name1);
content = content.replace(/{{char}}/gi, _name2);