mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-01 12:02:05 +00:00
test(matrix): authorize inviter in DM-invite fixture for new invite-auth gate
_on_invite now rejects auto-joins from users not on the allow-list. The DM-recording tests invite @alice and expect a join, so the shared _make_adapter fixture now puts @alice on _allowed_user_ids.
This commit is contained in:
parent
d836b2bac4
commit
e20ff352b9
1 changed files with 4 additions and 0 deletions
|
|
@ -31,6 +31,10 @@ def _make_adapter(tmp_path=None):
|
|||
adapter._text_batch_delay_seconds = 0
|
||||
adapter.handle_message = AsyncMock()
|
||||
adapter._startup_ts = time.time() - 10
|
||||
# Authorize the inviter used throughout this module so the invite-auth
|
||||
# gate in _on_invite (rejects auto-joins from non-allow-listed users)
|
||||
# lets the join through and the DM-recording side effects are exercised.
|
||||
adapter._allowed_user_ids = {"@alice:example.org"}
|
||||
return adapter
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue