diff --git a/backend/src/index.ts b/backend/src/index.ts index 70bf4d2e..7ab1032d 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -174,7 +174,7 @@ connect().then(async () => { client.setMaxListeners(200); client.on("rateLimit", rateLimitData => { - logger.info(`[429] ${rateLimitData}`); + logger.info(`[429] ${JSON.stringify(rateLimitData)}`); }); client.on("error", err => { diff --git a/backend/src/plugins/Utility/events/AutoJoinThreadEvt.ts b/backend/src/plugins/Utility/events/AutoJoinThreadEvt.ts index 6789073c..84c36768 100644 --- a/backend/src/plugins/Utility/events/AutoJoinThreadEvt.ts +++ b/backend/src/plugins/Utility/events/AutoJoinThreadEvt.ts @@ -5,7 +5,7 @@ export const AutoJoinThreadEvt = utilityEvt({ async listener(meta) { const config = meta.pluginData.config.get(); - if (config.autojoin_threads && meta.args.thread.joinable && !meta.args.thread.joined) { + if (config.autojoin_threads && meta.args.thread.joinable) { await meta.args.thread.join(); } }, @@ -16,11 +16,10 @@ export const AutoJoinThreadSyncEvt = utilityEvt({ async listener(meta) { const config = meta.pluginData.config.get(); - if (config.autojoin_threads) { - for (const thread of meta.args.threads.values()) { - if (!thread.joined && thread.joinable) { - await thread.join(); - } + if (config.autojoin_threads) return; + for (const thread of meta.args.threads.values()) { + if (!thread.joined && thread.joinable) { + await thread.join(); } } },