FEATURE: Disable minimum post length check when in PM with non human users.

https://meta.discourse.org/t/discourse-narrative-bot-beta-feedback/58621/65?u=tgxworld
This commit is contained in:
Guo Xiang Tan
2017-04-27 11:53:53 +08:00
parent b755279cf0
commit 59b906ab0d
11 changed files with 138 additions and 24 deletions

View File

@ -30,7 +30,7 @@ class Validators::PostValidator < ActiveModel::Validator
end
def post_body_validator(post)
return if options[:skip_post_body]
return if options[:skip_post_body] || post.topic&.pm_with_non_human_user?
stripped_length(post)
raw_quality(post)
end