refactor: make telegram config optional for non-telegram setups

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-02-10 09:27:18 -08:00
parent 48fab11066
commit 213dba855a
7 changed files with 32 additions and 21 deletions
+3
View File
@@ -163,6 +163,9 @@ const checkTelegram: Check = async (ctx) => {
if (!ctx.config) {
return { status: 'skip', label: 'Telegram bot configured', detail: '(config invalid)' };
}
if (!ctx.config.telegram) {
return { status: 'skip', label: 'Telegram bot configured', detail: '(not configured)' };
}
if (!ctx.config.telegram.bot_token || ctx.config.telegram.bot_token.length < 10) {
return { status: 'warn', label: 'Telegram bot configured', detail: 'token looks too short' };
}