Browse Source

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

* Admin API for server notice: disable rate limit for all calls

* Add changelog

* Update changelog.d/16670.bugfix
tags/v1.98.0rc1
Mathieu Velten 5 months ago
committed by GitHub
parent
commit
c432d8f18f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      changelog.d/16670.bugfix
  2. +2
    -0
      synapse/server_notices/server_notices_manager.py

+ 1
- 0
changelog.d/16670.bugfix View File

@@ -0,0 +1 @@
Consistently bypass rate limits when using the server notice admin API.

+ 2
- 0
synapse/server_notices/server_notices_manager.py View File

@@ -226,6 +226,7 @@ class ServerNoticesManager:
target=UserID.from_string(user_id),
room_id=room_id,
action="invite",
ratelimit=False,
)

async def _update_notice_user_profile_if_changed(
@@ -268,5 +269,6 @@ class ServerNoticesManager:
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…
Cancel
Save