summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorTravis Ralston <travisr@element.io>2024-07-11 07:03:13 -0600
committerGitHub <noreply@github.com>2024-07-11 14:03:13 +0100
commit677142b6a965baf36a3cc59c4e997bbd67891d42 (patch)
treeaf56181bc6dbb9331e23c8adbd9e5ffd29c20d22 /synapse
parentAdd Red Hat Enterprise Linux and Rocky Linux installation instructions (#17423) (diff)
downloadsynapse-677142b6a965baf36a3cc59c4e997bbd67891d42.tar.xz
Fix docs on `record_action` to clarify the actions are applied (#17426)
This looks like a copy/paste error: the function doesn't reject
anything, but instead allows the action count to go through regardless.
The remainder of the function's documentation appears correct.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/api/ratelimiting.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/api/ratelimiting.py b/synapse/api/ratelimiting.py
index 26b8711851..b80630c5d3 100644
--- a/synapse/api/ratelimiting.py
+++ b/synapse/api/ratelimiting.py
@@ -236,9 +236,8 @@ class Ratelimiter:
             requester: The requester that is doing the action, if any.
             key: An arbitrary key used to classify an action. Defaults to the
                 requester's user ID.
-            n_actions: The number of times the user wants to do this action. If the user
-                cannot do all of the actions, the user's action count is not incremented
-                at all.
+            n_actions: The number of times the user performed the action. May be negative
+                to "refund" the rate limit.
             _time_now_s: The current time. Optional, defaults to the current time according
                 to self.clock. Only used by tests.
         """