FIX: Count the links in the post
This commit is contained in:
parent
1bab15c757
commit
016b9cd0e9
|
@ -93,7 +93,7 @@ class Validators::PostValidator < ActiveModel::Validator
|
|||
end
|
||||
|
||||
def can_post_links_validator(post)
|
||||
return if acting_user_is_trusted?(post, SiteSetting.min_trust_to_post_links) || private_message?(post)
|
||||
return if post.link_count === 0 || acting_user_is_trusted?(post, SiteSetting.min_trust_to_post_links) || private_message?(post)
|
||||
|
||||
post.errors.add(:base, I18n.t(:links_require_trust))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue