Check chat_metadata in JSONL header

51f9590a8f46a6d40f729bc646972c5422abf02d

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Showing whitespace changes
src/endpoints/chats.js+1 -1
@@ -696,7 +696,7 @@ router.post('/import', validateAvatarUrlMiddleware, function (request, response)
696696
697 const jsonData = JSON.parse(header);697 const jsonData = JSON.parse(header);
698698
699 if (!(jsonData.user_name !== undefined || jsonData.name !== undefined)) {699 if (!(jsonData.user_name !== undefined || jsonData.name !== undefined || jsonData.chat_metadata !== undefined)) {
700 console.error('Incorrect chat format .jsonl');700 console.error('Incorrect chat format .jsonl');
701 return response.send({ error: true });701 return response.send({ error: true });
702 }702 }