comments: remove 2 comments per hour limit.

Remove the rule that Members could only post 2 bumping comments per
hour.

This was frequently misunderstood as meaning that Members could only
post 2 comments per hour. In fact, Members could post an unlimited
number of comments per hour, but the rest of their comments had to be
non-bumping. The error message we showed to users was misleading. Even
our own code misunderstood what this did when describing the config
option.

Gold users also weren't subject to this limit, which was unfair since
Gold users aren't any better at commenting than regular users. The fact
that a large number of users already ignored bump limits and nobody
really noticed indicates that the limit was unnecessary.
This commit is contained in:
evazion
2021-01-22 04:29:24 -06:00
parent 2eecf4d695
commit 9d71ece55d
6 changed files with 0 additions and 27 deletions

View File

@@ -1,5 +1,4 @@
class Comment < ApplicationRecord
validate :validate_creator_is_not_limited, :on => :create
validates_presence_of :body, :message => "has no content"
belongs_to :post
belongs_to :creator, class_name: "User"
@@ -46,12 +45,6 @@ class Comment < ApplicationRecord
extend SearchMethods
def validate_creator_is_not_limited
if creator.is_comment_limited? && !do_not_bump_post?
errors.add(:base, "You can only post #{Danbooru.config.member_comment_limit} comments per hour")
end
end
def autoreport_spam
if SpamDetector.new(self).spam?
moderation_reports << ModerationReport.new(creator: User.system, reason: "Spam.")