mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-15 17:51:10 +00:00
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.
This commit is contained in:
parent
342f0c35b7
commit
677142b6a9
2 changed files with 3 additions and 3 deletions
1
changelog.d/17426.misc
Normal file
1
changelog.d/17426.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix documentation on `RateLimiter#record_action`.
|
|
@ -236,9 +236,8 @@ class Ratelimiter:
|
||||||
requester: The requester that is doing the action, if any.
|
requester: The requester that is doing the action, if any.
|
||||||
key: An arbitrary key used to classify an action. Defaults to the
|
key: An arbitrary key used to classify an action. Defaults to the
|
||||||
requester's user ID.
|
requester's user ID.
|
||||||
n_actions: The number of times the user wants to do this action. If the user
|
n_actions: The number of times the user performed the action. May be negative
|
||||||
cannot do all of the actions, the user's action count is not incremented
|
to "refund" the rate limit.
|
||||||
at all.
|
|
||||||
_time_now_s: The current time. Optional, defaults to the current time according
|
_time_now_s: The current time. Optional, defaults to the current time according
|
||||||
to self.clock. Only used by tests.
|
to self.clock. Only used by tests.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue