#2046 Fix for undefined fields

This commit is contained in:
Cohee
2024-04-09 10:11:05 +03:00
parent d56722a4b6
commit 0594859fb9
2 changed files with 20 additions and 2 deletions

View File

@@ -74,6 +74,8 @@ router.post('/create', jsonParser, (request, response) => {
chat_id: request.body.chat_id ?? id,
chats: request.body.chats ?? [id],
auto_mode_delay: request.body.auto_mode_delay ?? 5,
generation_mode_join_prefix: request.body.generation_mode_join_prefix ?? '',
generation_mode_join_suffix: request.body.generation_mode_join_suffix ?? '',
};
const pathToFile = path.join(DIRECTORIES.groups, `${id}.json`);
const fileData = JSON.stringify(groupMetadata);