FIX: limit_topics_per_day should only apply to regular topics (#11127)

PMs were being evaluted by both the limit_topics_per_day and limit_private_messages_per_day rate limiters when it should only be the latter.
This commit is contained in:
tshenry
2020-11-04 16:23:49 -08:00
committed by GitHub
parent 1ec76ff8d4
commit d778d99b55
2 changed files with 24 additions and 0 deletions

View File

@ -441,6 +441,7 @@ class Topic < ActiveRecord::Base
# Additional rate limits on topics: per day and private messages per day
def limit_topics_per_day
return unless regular?
if user && user.new_user_posting_on_first_day?
limit_first_day_topics_per_day
else