From 4c5394d0baabb8a01499214d1dcc10a35d3e806b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 22 Apr 2026 20:18:16 +0100 Subject: [PATCH] fix: lower Telegram webhook callback timeout (#70146) (thanks @friday-james) --- CHANGELOG.md | 1 + extensions/telegram/src/webhook.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abf1dbc362f..a8543e358be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Telegram/webhooks: lower the grammY webhook callback timeout to 5s so Telegram gets an early 200 response instead of retrying long-running updates as read timeouts. (#70146) Thanks @friday-james. - Telegram/polling: rebuild the polling HTTP transport after `getUpdates` 409 conflicts, so retries use a fresh TCP connection instead of looping on a Telegram-terminated keep-alive socket. (#69873) Thanks @hclsys. - Slack/files: resolve `downloadFile` bot tokens from the runtime config when callers provide `cfg` without an explicit token or prebuilt client, preserving cfg-only file downloads outside the action runtime path. (#70160) Thanks @martingarramon. - Slack/HTTP: dispatch registered Request URL webhooks through the same handler registry used by Slack monitor setup, so HTTP-mode Slack events no longer 404 after successful route registration. (#70275) Thanks @FroeMic. diff --git a/extensions/telegram/src/webhook.ts b/extensions/telegram/src/webhook.ts index d8fb58dd29d..295c686add0 100644 --- a/extensions/telegram/src/webhook.ts +++ b/extensions/telegram/src/webhook.ts @@ -28,6 +28,7 @@ import { createTelegramBot } from "./bot.js"; const TELEGRAM_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024; const TELEGRAM_WEBHOOK_BODY_TIMEOUT_MS = 30_000; +// Keep below Telegram/proxy read timeouts; grammY returns early while the handler continues. const TELEGRAM_WEBHOOK_CALLBACK_TIMEOUT_MS = 5_000; const InputFileCtor: typeof grammy.InputFile = typeof grammy.InputFile === "function"