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:
Teknium 2026-06-28 19:29:24 -07:00
parent d836b2bac4
commit e20ff352b9

View file

@ -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