fix(channels): delete unreachable Telegram webhook delivery mode

telegram.New only ever constructed with empty webhookURL/webhookSecret
(telegram_setup.go) and config.TelegramConfig has no field to set them, so
the SetWebhook/StartWebhook branch, WebhookHandler, and webhook teardown in
Stop were dead code exercised only by tests. Long-polling is the only
reachable mode; delete the webhook path and its ConfigSchema properties so
the schema no longer advertises unsupported config.
This commit is contained in:
sam committed 2026-09-15 10:18:48 +10:00
1 parent e537447333
commit 0535b9ddd4
10 files changed
+101 -184

No files matched your search

+1 -1
View File
@@ -102,7 +102,7 @@ func setupTelegramGateway(ctx context.Context, s telegramSetup) (start func(), o
s.Log.Warn("chat.telegram has no allowed_user_ids: every sender will be rejected. " +
"Add your Telegram user id to chat.telegram.allowed_user_ids to enable the bot.")
}
tg := telegram.New(tgToken, "", "", cfg.Chat.Telegram.AllowedUserIDs, s.Log)
tg := telegram.New(tgToken, cfg.Chat.Telegram.AllowedUserIDs, s.Log)
if s.RegisterRestart != nil {
s.RegisterRestart(tg.RequestRestart)
}