mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(telegram): restore DM topic typing indicator
This commit is contained in:
parent
e51d74ab91
commit
6f817e1447
2 changed files with 9 additions and 16 deletions
|
|
@ -236,14 +236,13 @@ async def test_send_typing_does_not_fall_back_to_root_for_dm_topic():
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_typing_skips_api_call_for_dm_topic_reply_fallback():
|
||||
"""Hermes-created DM topic lanes have no working Bot API typing route.
|
||||
async def test_send_typing_attempts_api_call_for_dm_topic_reply_fallback():
|
||||
"""Hermes-created DM topic lanes should still attempt scoped typing.
|
||||
|
||||
``send_chat_action`` only accepts ``message_thread_id``, which Telegram's
|
||||
Bot API 10.0 rejects for these lanes — the call would silently fail and
|
||||
log a "thread not found" warning every typing tick (every 2s). Skipping
|
||||
the call entirely keeps logs clean while preserving the user-visible
|
||||
behavior (no typing indicator either way for these lanes).
|
||||
Some private DM topic lanes route message sends through reply-anchor
|
||||
fallback, but live Telegram testing shows sendChatAction accepts the lane's
|
||||
message_thread_id. If Telegram rejects a stale or invalid thread later,
|
||||
send_typing already swallows that failure as non-fatal.
|
||||
"""
|
||||
adapter = _make_adapter()
|
||||
call_log = []
|
||||
|
|
@ -262,7 +261,9 @@ async def test_send_typing_skips_api_call_for_dm_topic_reply_fallback():
|
|||
},
|
||||
)
|
||||
|
||||
assert call_log == []
|
||||
assert call_log == [
|
||||
{"chat_id": 12345, "action": "typing", "message_thread_id": 20197},
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue