FIX: Consider oneboxes links wrt to min_trust_level_to_post_links

This commit is contained in:
Robin Ward
2018-02-08 18:26:56 -05:00
parent 69bccb9e32
commit 5466389f4e
4 changed files with 28 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ class Validators::PostValidator < ActiveModel::Validator
end
def can_post_links_validator(post)
return if post.link_count == 0 ||
return if (post.link_count == 0 && !post.has_oneboxes?) ||
Guardian.new(post.acting_user).can_post_link? ||
private_message?(post)