hermes-agent/plugins/platforms
teknium1 ab1f9b94c5 fix(telegram): accept @username chat_id in delivery paths (#13206)
TELEGRAM_HOME_CHANNEL set to an @username (not a numeric chat ID) crashed
all webhook/cron->Telegram home-channel delivery with 'ValueError: invalid
literal for int()'. The Telegram Bot API accepts both a numeric chat_id and
an @username string; Hermes was force-coercing every chat_id with int().

Add normalize_telegram_chat_id() (returns int for numeric values, passes
@username strings through) and apply it at the Bot API send/edit sites in
the Telegram adapter and the send_message tool. Username targets are now
recognized as explicit targets in _parse_target_ref.

Reapplies the approach from #13274 (season179), whose branch predated the
gateway/platforms/telegram.py -> plugins/platforms/telegram/adapter.py
relocation. Dupes: #13535 (Tranquil-Flow), #37572 (chewkaah).

Co-authored-by: season179 <season.saw@gmail.com>
2026-06-27 04:01:58 -07:00
..
dingtalk fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
discord refactor(telegram): import shared table-detection primitives from helpers.py 2026-06-27 03:57:24 +05:30
email fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
feishu fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
google_chat fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
homeassistant fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
irc fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
line fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
matrix fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
mattermost fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
ntfy fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
photon fix(photon): correlate tapbacks to bot message context 2026-06-27 00:51:34 -07:00
raft fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
simplex fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
slack fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
sms fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
teams fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
telegram fix(telegram): accept @username chat_id in delivery paths (#13206) 2026-06-27 04:01:58 -07:00
wecom fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
whatsapp fix(tools): use start_new_session instead of preexec_fn to prevent SIGSEGV in multi-threaded processes 2026-06-27 03:08:41 +05:30