hermes-agent/gateway/platforms
kshitijk4poor 1d2e34c7eb Prevent Telegram polling handoffs and flood-control send failures
Telegram polling can inherit a stale webhook registration when a deployment
switches transport modes, which leaves getUpdates idle even though the gateway
starts cleanly. Outbound send also treats Telegram retry_after responses as
terminal errors, so brief flood control can drop tool progress and replies.

Constraint: Keep the PR narrowly scoped to upstream/main Telegram adapter behavior
Rejected: Port OpenClaw's broader polling supervisor and offset persistence | too broad for an isolated fix PR
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Polling mode should clear webhook state before starting getUpdates, and send-path retry logic must distinguish flood control from timeouts
Tested: uv run --extra dev pytest tests/gateway/test_telegram_* -q
Not-tested: Live Telegram webhook-to-polling migration and real Bot API 429 behavior
2026-04-05 11:59:28 -07:00
..
ADDING_A_PLATFORM.md
…
__init__.py
…
api_server.py fix(api-server): pass fallback_model to AIAgent (#4954) 2026-04-05 11:59:28 -07:00
base.py fix: /status command bypasses active-session guard during agent run (#5046) 2026-04-05 11:59:28 -07:00
dingtalk.py
…
discord.py feat(gateway): live-stream /update output + interactive prompt buttons (#5180) 2026-04-05 00:28:58 -07:00
email.py
…
feishu.py
…
homeassistant.py
…
matrix.py feat(matrix): Tier 1 enhancement — reactions, read receipts, rich formatting, room management 2026-04-05 11:19:54 -07:00
mattermost.py fix(gateway): stop Matrix/Mattermost reconnect on permanent auth failures 2026-04-05 11:07:47 -07:00
signal.py
…
slack.py
…
sms.py
…
telegram.py Prevent Telegram polling handoffs and flood-control send failures 2026-04-05 11:59:28 -07:00
telegram_network.py
…
webhook.py
…
wecom.py
…
whatsapp.py
…