Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Server notices: add an autojoin setting for the notices room #16699

Merged
merged 5 commits into from
Dec 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update tests/rest/admin/test_server_notice.py
Co-authored-by: Patrick Cloke <[email protected]>
MatMaul and clokep authored Nov 30, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8597dd14e5fef677f43ce485bb48261219e51e36
3 changes: 3 additions & 0 deletions tests/rest/admin/test_server_notice.py
Original file line number Diff line number Diff line change
@@ -485,8 +485,10 @@ def test_auto_join(self) -> None:
Tests that the user get automatically joined to the notice room
when `auto_join` setting is used.
"""
# user has no room memberships
self._check_invite_and_join_status(self.other_user, 0, 0)

# send server notice
server_notice_request_content = {
"user_id": self.other_user,
"content": {"msgtype": "m.text", "body": "test msg one"},
@@ -499,6 +501,7 @@ def test_auto_join(self) -> None:
content=server_notice_request_content,
)

# user has joined the room
self._check_invite_and_join_status(self.other_user, 0, 1)

@override_config({"server_notices": {"system_mxid_localpart": "notices"}})