From 5b5e42361acecfcbdcde21bf2ab8c066ebc7c93f Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 15 Nov 2023 01:06:27 +0200 Subject: [PATCH] Fix chat backups saving with incorrect file extension --- public/scripts/tags.js | 2 +- server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/tags.js b/public/scripts/tags.js index c71e6287a..d479d177e 100644 --- a/public/scripts/tags.js +++ b/public/scripts/tags.js @@ -718,7 +718,7 @@ function onTagListHintClick() { $(this).siblings(".innerActionable").toggleClass('hidden'); } -$(document).ready(() => { +jQuery(() => { createTagInput('#tagInput', '#tagList'); createTagInput('#groupTagInput', '#groupTagList'); diff --git a/server.js b/server.js index c3f47880b..7ff4de46b 100644 --- a/server.js +++ b/server.js @@ -3640,7 +3640,7 @@ function backupChat(name, chat) { // replace non-alphanumeric characters with underscores name = sanitize(name).replace(/[^a-z0-9]/gi, '_').toLowerCase(); - const backupFile = path.join(DIRECTORIES.backups, `chat_${name}_${generateTimestamp()}.json`); + const backupFile = path.join(DIRECTORIES.backups, `chat_${name}_${generateTimestamp()}.jsonl`); writeFileAtomicSync(backupFile, chat, 'utf-8'); removeOldBackups(`chat_${name}_`);