Fix crash when using newThreadCategoryId without categoryAutomation

cshd
Dragory 2020-08-24 19:35:01 +03:00
parent 8930e5dde8
commit aea216f289
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 1 additions and 0 deletions

View File

@ -148,6 +148,7 @@ if (config.greetingMessage || config.greetingAttachment) {
// newThreadCategoryId is syntactic sugar for categoryAutomation.newThread // newThreadCategoryId is syntactic sugar for categoryAutomation.newThread
if (config.newThreadCategoryId) { if (config.newThreadCategoryId) {
config.categoryAutomation = config.categoryAutomation || {};
config.categoryAutomation.newThread = config.newThreadCategoryId; config.categoryAutomation.newThread = config.newThreadCategoryId;
delete config.newThreadCategoryId; delete config.newThreadCategoryId;
} }