mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Allow use of different ratelimits for admin redactions.
This is useful to allow room admins to quickly deal with a large number of abusive messages.
This commit is contained in:
parent
5e9b05d7da
commit
54ce81c86d
4 changed files with 55 additions and 11 deletions
|
@ -729,7 +729,13 @@ class EventCreationHandler(object):
|
|||
assert not self.config.worker_app
|
||||
|
||||
if ratelimit:
|
||||
yield self.base_handler.ratelimit(requester)
|
||||
is_admin_redaction = (
|
||||
event.type == EventTypes.Redaction
|
||||
and event.sender != requester.user.to_string()
|
||||
)
|
||||
yield self.base_handler.ratelimit(
|
||||
requester, is_admin_redaction=is_admin_redaction
|
||||
)
|
||||
|
||||
yield self.base_handler.maybe_kick_guest_users(event, context)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue