fix(matrix): route text-only send_message through adapter for E2EE support - #20259
Closed
DanAsBjorn wants to merge 1 commit into
Closed
fix(matrix): route text-only send_message through adapter for E2EE support#20259DanAsBjorn wants to merge 1 commit into
DanAsBjorn wants to merge 1 commit into
Conversation
…pport Text-only Matrix messages sent via the send_message tool were routed through the raw HTTP PUT path (_send_matrix), which does not support E2EE encryption. Messages arrived with a red padlock in encrypted rooms. All Matrix sends now go through _send_matrix_via_adapter, which uses the mautrix adapter with proper E2EE support. The adapter path was already used for media sends; this change extends it to text-only sends. The dead _send_matrix fallback case in the text-only routing block is also removed.
19 tasks
19 tasks
teknium1
added a commit
that referenced
this pull request
Jul 1, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR #20259 onto current main (the original patched the pre-#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
Contributor
|
Merged via PR #56106 (commit a537baa on main). Your fix was salvaged onto current main with your authorship preserved in git log — thanks! Your original patched the pre-#41112 _send_matrix branch, which had since moved into the matrix plugin's standalone_sender_fn path, so it was re-applied to the current structure. Same fix, same outcome: all Matrix sends now route through the E2EE-capable adapter so text-only messages encrypt in E2EE rooms. |
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (NousResearch#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR NousResearch#20259 onto current main (the original patched the pre-NousResearch#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
Jasper6439
pushed a commit
to Jasper6439/hermes-agent
that referenced
this pull request
Jul 5, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (NousResearch#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR NousResearch#20259 onto current main (the original patched the pre-NousResearch#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (NousResearch#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR NousResearch#20259 onto current main (the original patched the pre-NousResearch#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (NousResearch#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR NousResearch#20259 onto current main (the original patched the pre-NousResearch#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (NousResearch#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR NousResearch#20259 onto current main (the original patched the pre-NousResearch#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…pport Text-only Matrix messages sent via the send_message engine (hermes send, cron deliver: matrix) arrived unencrypted (red padlock) in E2EE rooms. Media sends already routed through the mautrix adapter and encrypted fine, but text-only sends took the raw-HTTP standalone_sender_fn path, which never encrypts. Route ALL Matrix sends through _send_matrix_via_adapter so text is encrypted too. The adapter reuses the live gateway's E2EE session when available (NousResearch#46310) and falls back to an encryption-aware ephemeral adapter for standalone/cron contexts. The registry standalone_sender_fn stays registered for the contract; it is simply no longer reached for Matrix. Salvaged from PR NousResearch#20259 onto current main (the original patched the pre-NousResearch#41112 _send_matrix branch, which had since moved to the plugin's standalone path). Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes text-only Matrix messages sent via
send_messagearriving unencrypted (red padlock) in E2EE rooms.The
send_messagetool had two Matrix send paths:_send_matrix_via_adapter(mautrix adapter, E2EE supported)_send_matrix(raw HTTP PUT, no E2EE)This change routes all Matrix sends through the adapter path, so text messages are properly encrypted in E2EE rooms.
Related
276ed5c39added_send_matrix_via_adapterspecifically for media deliveryChanges
tools/send_message_tool.py: Removemedia_filescondition from Matrix adapter routing — all Matrix sends now use the adapter_send_matrixfallback case from text-only routing blockTest Plan
_send_matrix_via_adapterworks for text-only messages against a live E2EE Matrix room (message delivered without red padlock)tests/tools/test_send_message_tool.pypasstests/tools/test_send_message_missing_platforms.pypass