Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c80396942 |
@@ -374,6 +374,7 @@ discourse_ai:
|
|||||||
|
|
||||||
ai_spam_detection_enabled:
|
ai_spam_detection_enabled:
|
||||||
default: false
|
default: false
|
||||||
|
validator: "DiscourseAi::Configuration::SpamDetectionValidator"
|
||||||
ai_spam_detection_user_id:
|
ai_spam_detection_user_id:
|
||||||
default: ""
|
default: ""
|
||||||
hidden: true
|
hidden: true
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ module DiscourseAi
|
|||||||
def valid_value?(val)
|
def valid_value?(val)
|
||||||
return true if Rails.env.test?
|
return true if Rails.env.test?
|
||||||
return true if AiModerationSetting.spam
|
return true if AiModerationSetting.spam
|
||||||
|
# only validate when enabling setting
|
||||||
|
return true if val == "f"
|
||||||
|
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user