mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 02:01:47 +00:00
test(matrix): set user_id in approval-reaction test to bypass defensive self-drop
MatrixAdapter._is_self_sender returns True defensively when _user_id is empty (whoami not yet resolved) to prevent echo loops — see #15763. The reaction approval test must therefore initialize a user_id so _on_reaction does not drop the inbound test event before reaching the approval handler.
This commit is contained in:
parent
38a6bada92
commit
3d67364b8f
1 changed files with 2 additions and 0 deletions
|
|
@ -37,6 +37,8 @@ class TestMatrixExecApprovalReactions:
|
|||
from gateway.platforms.matrix import MatrixAdapter, _MatrixApprovalPrompt
|
||||
|
||||
adapter = MatrixAdapter(PlatformConfig(enabled=True, token="tok", extra={"homeserver": "https://matrix.example.org"}))
|
||||
# Resolve user_id so _is_self_sender doesn't defensively drop all traffic (#15763).
|
||||
adapter._user_id = "@bot:example.org"
|
||||
adapter._approval_prompts_by_event["$target"] = _MatrixApprovalPrompt(
|
||||
session_key="sess-1", chat_id="!room:example.org", message_id="$target"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue