From b9446712e93a88f0b335435ca3ab594f729d12ee Mon Sep 17 00:00:00 2001 From: smkrv <17809065+smkrv@users.noreply.github.com> Date: Wed, 4 Mar 2026 17:40:28 +0300 Subject: [PATCH] fix(telegram): add missing webhook section to capabilities.json (#381) The Telegram channel capabilities file was missing the `webhook` block inside `capabilities.channel`, causing the router to fall back to the default `X-Webhook-Secret` header instead of the Telegram- specific `X-Telegram-Bot-Api-Secret-Token`. When a webhook secret is configured (via `telegram_webhook_secret`), incoming updates are rejected with 401 because Telegram sends the token in `X-Telegram-Bot-Api-Secret-Token` but the router looks for `X-Webhook-Secret`. The existing test in `schema.rs` already expects the correct header name, confirming this is an oversight in the shipped capabilities file. Co-authored-by: SMKRV Co-authored-by: firat.sertgoz --- channels-src/telegram/telegram.capabilities.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/channels-src/telegram/telegram.capabilities.json b/channels-src/telegram/telegram.capabilities.json index a70fb3fa..bdc3e4f8 100644 --- a/channels-src/telegram/telegram.capabilities.json +++ b/channels-src/telegram/telegram.capabilities.json @@ -39,6 +39,10 @@ "emit_rate_limit": { "messages_per_minute": 100, "messages_per_hour": 5000 + }, + "webhook": { + "secret_header": "X-Telegram-Bot-Api-Secret-Token", + "secret_name": "telegram_webhook_secret" } } },