mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: max_topics_per_day was not working
This commit is contained in:
@@ -262,8 +262,11 @@ class Topic < ActiveRecord::Base
|
|||||||
|
|
||||||
# Additional rate limits on topics: per day and private messages per day
|
# Additional rate limits on topics: per day and private messages per day
|
||||||
def limit_topics_per_day
|
def limit_topics_per_day
|
||||||
|
if user && user.first_day_user?
|
||||||
|
limit_first_day_topics_per_day
|
||||||
|
else
|
||||||
apply_per_day_rate_limit_for("topics", :max_topics_per_day)
|
apply_per_day_rate_limit_for("topics", :max_topics_per_day)
|
||||||
limit_first_day_topics_per_day if user && user.first_day_user?
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def limit_private_messages_per_day
|
def limit_private_messages_per_day
|
||||||
|
|||||||
Reference in New Issue
Block a user