diff --git a/lib/search.rb b/lib/search.rb index 6811a98be..e99e60361 100644 --- a/lib/search.rb +++ b/lib/search.rb @@ -393,7 +393,7 @@ class Search def posts_query(limit, opts=nil) opts ||= {} - posts = Post.where(post_type: Post.types[:regular]) + posts = Post.where(post_type: Topic.visible_post_types(@guardian.user)) .joins(:post_search_data, :topic) .joins("LEFT JOIN categories ON categories.id = topics.category_id") .where("topics.deleted_at" => nil)