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

Admin API for server notice: consistently bypass rate limits #16670

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions changelog.d/16670.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Consistently bypass rate limits when using the server notice admin API.
2 changes: 2 additions & 0 deletions synapse/server_notices/server_notices_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ async def maybe_invite_user_to_room(self, user_id: str, room_id: str) -> None:
target=UserID.from_string(user_id),
room_id=room_id,
action="invite",
ratelimit=False,
)

async def _update_notice_user_profile_if_changed(
Expand Down Expand Up @@ -268,5 +269,6 @@ async def _update_notice_user_profile_if_changed(
target=UserID.from_string(self.server_notices_mxid),
room_id=room_id,
action="join",
ratelimit=False,
content={"displayname": display_name, "avatar_url": avatar_url},
)
Loading