mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: gate Matrix adapter path on media_files presence
Text-only Matrix sends should continue using the lightweight _send_matrix() HTTP helper (~100ms). Only route through the heavy MatrixAdapter (full sync + E2EE setup) when media files are present. Adds test verifying text-only messages don't take the adapter path.
This commit is contained in:
parent
276ed5c399
commit
c850a40e4e
2 changed files with 21 additions and 2 deletions
|
|
@ -404,8 +404,8 @@ async def _send_to_platform(platform, pconfig, chat_id, message, thread_id=None,
|
|||
last_result = result
|
||||
return last_result
|
||||
|
||||
# --- Matrix: use the native adapter helper for text + media ---
|
||||
if platform == Platform.MATRIX:
|
||||
# --- Matrix: use the native adapter helper when media is present ---
|
||||
if platform == Platform.MATRIX and media_files:
|
||||
last_result = None
|
||||
for i, chunk in enumerate(chunks):
|
||||
is_last = (i == len(chunks) - 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue