Add setting to disable the anti-spam (#11296)
* Add environment variable to disable the anti-spam * Move antispam setting to admin settings * Fix typo * antispam → spam_check
This commit is contained in:
@ -14,7 +14,7 @@ class SpamCheck
|
||||
end
|
||||
|
||||
def skip?
|
||||
already_flagged? || trusted? || no_unsolicited_mentions? || solicited_reply?
|
||||
disabled? || already_flagged? || trusted? || no_unsolicited_mentions? || solicited_reply?
|
||||
end
|
||||
|
||||
def spam?
|
||||
@ -80,6 +80,10 @@ class SpamCheck
|
||||
|
||||
private
|
||||
|
||||
def disabled?
|
||||
!Setting.spam_check_enabled
|
||||
end
|
||||
|
||||
def remove_mentions(text)
|
||||
return text.gsub(Account::MENTION_RE, '') if @status.local?
|
||||
|
||||
|
Reference in New Issue
Block a user