refactor: make telegram config optional for non-telegram setups
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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' };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user