mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix colons hiding in group chats. Fix jsonl chat imports hanging
This commit is contained in:
@@ -1618,7 +1618,7 @@ app.post("/importchat", urlencodedParser, function (request, response) {
|
||||
rl.once('line', (line) => {
|
||||
let jsonData = json5.parse(line);
|
||||
|
||||
if (jsonData.user_name !== undefined) {
|
||||
if (jsonData.user_name !== undefined || jsonData.name !== undefined) {
|
||||
//console.log(humanizedISO8601DateTime()+':/importchat copying chat as '+ch_name+' - '+humanizedISO8601DateTime()+'.jsonl');
|
||||
fs.copyFile('./uploads/' + filedata.filename, chatsPath + avatar_url + '/' + ch_name + ' - ' + humanizedISO8601DateTime() + '.jsonl', (err) => { //added character name and replaced Date.now() with humanizedISO8601DateTime
|
||||
if (err) {
|
||||
@@ -1630,7 +1630,7 @@ app.post("/importchat", urlencodedParser, function (request, response) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//response.send({error:true});
|
||||
response.send({error:true});
|
||||
return;
|
||||
}
|
||||
rl.close();
|
||||
|
Reference in New Issue
Block a user