mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Don't employ the "too many replies" if the user is staff, or if they created the topic.
See: http://meta.discourse.org/t/what-is-the-point-of-limiting-new-users-to-three-replies-per-topic/11696
This commit is contained in:
@@ -354,6 +354,10 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def posted_too_much_in_topic?(topic_id)
|
||||
|
||||
# Does not apply to staff or your own topics
|
||||
return false if staff? || Topic.where(id: topic_id, user_id: id).exists?
|
||||
|
||||
trust_level == TrustLevel.levels[:newuser] && (Post.where(topic_id: topic_id, user_id: id).count >= SiteSetting.newuser_max_replies_per_topic)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user