mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-08-13 17:16:12 +00:00
_handle_media_message had the same gap as _handle_text_message: it didn't set user_id/user_name or any reply_to_* fields on MessageEvent. A user replying to a photo/video/audio in Matrix got null sender metadata and null reply context — the exact bug PR #80293 fixes for text messages. Mirrors the text handler's reply fallback parsing + sender propagation into the media handler, and adds a test covering a media reply event. Also fixes test env mutation: _make_adapter now accepts monkeypatch and uses monkeypatch.setenv() instead of bare os.environ assignment, preventing env var leakage across tests in the same xdist worker.