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

Commit

Permalink
Admin API for server notice: consistently bypass rate limits (#16670)
Browse files Browse the repository at this point in the history
* Admin API for server notice: disable rate limit for all calls

* Add changelog

* Update changelog.d/16670.bugfix
  • Loading branch information
MatMaul authored Nov 22, 2023
1 parent c8118ba commit c432d8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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},
)

0 comments on commit c432d8f

Please sign in to comment.