mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FEATURE: scale up likes per day as users increase trust level
tl2 = 1.5 times the likes tl3 = 2 times the likes tl4 = 3 times the likes configurable via tl[234]_additional_likes_per_day_multiplier site setting
This commit is contained in:
parent
9cb928e893
commit
a5b25ad2af
5 changed files with 46 additions and 1 deletions
|
@ -4,6 +4,8 @@ require_dependency 'rate_limiter/on_create_record'
|
|||
# A redis backed rate limiter.
|
||||
class RateLimiter
|
||||
|
||||
attr_reader :max, :secs, :user, :key
|
||||
|
||||
def self.key_prefix
|
||||
"l-rate-limit:"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue