summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-09-11 13:54:50 +0100
committerGitHub <noreply@github.com>2019-09-11 13:54:50 +0100
commit57dd41a45b4df5d736e2f30d40926b60f367b500 (patch)
treeb7bb8b4c5d0f79851b6325e2edfceee30ecf6226
parentAdd test for admin redaction ratelimiting. (diff)
downloadsynapse-57dd41a45b4df5d736e2f30d40926b60f367b500.tar.xz
Fix comments
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-rw-r--r--synapse/config/ratelimiting.py2
-rw-r--r--synapse/handlers/_base.py2
-rw-r--r--synapse/handlers/message.py2
-rw-r--r--tests/rest/client/test_redactions.py4
4 files changed, 5 insertions, 5 deletions
diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py
index b4df6612d6..587e2862b7 100644
--- a/synapse/config/ratelimiting.py
+++ b/synapse/config/ratelimiting.py
@@ -110,7 +110,7 @@ class RatelimitConfig(Config):
         #     attempts for this account.
         #   - one for ratelimiting redactions by room admins. If this is not explicitly
         #     set then it uses the same ratelimiting as per rc_message. This is useful
-        #     to allow room admins to quickly deal with abuse quickly.
+        #     to allow room admins to deal with abuse quickly.
         #
         # The defaults are as shown below.
         #
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 853b72d8e7..d15c6282fb 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -105,7 +105,7 @@ class BaseHandler(object):
 
         if is_admin_redaction and self.hs.config.rc_admin_redaction:
             # If we have separate config for admin redactions we use a separate
-            # ratelimiter.
+            # ratelimiter
             allowed, time_allowed = self.admin_redaction_ratelimiter.can_do_action(
                 user_id,
                 time_now,
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index f975909416..1f8272784e 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -731,7 +731,7 @@ class EventCreationHandler(object):
         if ratelimit:
             # We check if this is a room admin redacting an event so that we
             # can apply different ratelimiting. We do this by simply checking
-            # its not a self-redaction (to avoid having to look up whether the
+            # it's not a self-redaction (to avoid having to look up whether the
             # user is actually admin or not).
             is_admin_redaction = False
             if event.type == EventTypes.Redaction:
diff --git a/tests/rest/client/test_redactions.py b/tests/rest/client/test_redactions.py
index 1b1e991c42..d2bcf256fa 100644
--- a/tests/rest/client/test_redactions.py
+++ b/tests/rest/client/test_redactions.py
@@ -197,8 +197,8 @@ class RedactionsTestCase(HomeserverTestCase):
             message_ids.append(b["event_id"])
             self.reactor.advance(10)  # To get around ratelimits
 
-        # as the moderator, send a bunch of redactions redaction
+        # as the moderator, send a bunch of redactions
         for msg_id in message_ids:
             # These should all succeed, even though this would be denied by
-            # standard message ratelimiter
+            # the standard message ratelimiter
             self._redact_event(self.mod_access_token, self.room_id, msg_id)