mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-15 04:12:25 +00:00
fix(teams): fall back to flat send when threading returns 400
Group chats return 400 for threaded sends. Catch the error and fall back to a flat send so messages always get delivered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
69aeba0df7
commit
3f023450dd
1 changed files with 5 additions and 2 deletions
|
|
@ -509,8 +509,11 @@ class TeamsAdapter(BasePlatformAdapter):
|
||||||
|
|
||||||
for chunk in chunks:
|
for chunk in chunks:
|
||||||
try:
|
try:
|
||||||
if reply_to:
|
if reply_to and reply_to.isdigit() and reply_to != "0":
|
||||||
result = await self._app.reply(chat_id, reply_to, chunk)
|
try:
|
||||||
|
result = await self._app.reply(chat_id, reply_to, chunk)
|
||||||
|
except Exception:
|
||||||
|
result = await self._app.send(chat_id, chunk)
|
||||||
else:
|
else:
|
||||||
result = await self._app.send(chat_id, chunk)
|
result = await self._app.send(chat_id, chunk)
|
||||||
last_message_id = getattr(result, "id", None)
|
last_message_id = getattr(result, "id", None)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue