summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-09-11 10:46:38 +0100
committerErik Johnston <erik@matrix.org>2019-09-11 10:46:38 +0100
commit54ce81c86d163b883df67b97540426759a9f6363 (patch)
treeceedd9e9bf3f685789a0bbdf950aa359429cfbac /synapse/server.py
parentMerge pull request #6011 from matrix-org/anoa/fix_3pid_validation (diff)
downloadsynapse-54ce81c86d163b883df67b97540426759a9f6363.tar.xz
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.
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 9e28dba2b1..1fcc7375d3 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -221,6 +221,7 @@ class HomeServer(object):
         self.clock = Clock(reactor)
         self.distributor = Distributor()
         self.ratelimiter = Ratelimiter()
+        self.admin_redaction_ratelimiter = Ratelimiter()
         self.registration_ratelimiter = Ratelimiter()
 
         self.datastore = None
@@ -279,6 +280,9 @@ class HomeServer(object):
     def get_registration_ratelimiter(self):
         return self.registration_ratelimiter
 
+    def get_admin_redaction_ratelimiter(self):
+        return self.admin_redaction_ratelimiter
+
     def build_federation_client(self):
         return FederationClient(self)