fix(telegram): restore DM topic typing indicator

This commit is contained in:
helix4u 2026-05-16 16:23:35 -06:00 committed by Teknium
parent e51d74ab91
commit 6f817e1447
2 changed files with 9 additions and 16 deletions

View file

@ -3504,14 +3504,6 @@ class TelegramAdapter(BasePlatformAdapter):
if self._bot:
try:
_typing_thread = self._metadata_thread_id(metadata)
# Skip the Bot API call entirely for Hermes-created DM topic
# lanes: send_chat_action only accepts message_thread_id, which
# Telegram's Bot API 10.0 rejects for these lanes. The send
# path uses the reply-anchor fallback instead, but typing has
# no equivalent — skipping avoids noisy "thread not found"
# debug logs on every typing tick.
if metadata and metadata.get("telegram_dm_topic_reply_fallback"):
return
message_thread_id = self._message_thread_id_for_typing(_typing_thread)
# No retry-without-thread fallback here: _message_thread_id_for_typing
# already maps the forum General topic to None, so any non-None value