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
pull/16678/head
Mathieu Velten 2023-11-22 14:47:29 +01:00 committed by GitHub
parent c8118ba8c9
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
changelog.d/16670.bugfix Normal file
View File

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

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},
)