diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 77f693046e4..dd66c7e7e0f 100644 --- a/app/controllers/embed_controller.rb +++ b/app/controllers/embed_controller.rb @@ -22,7 +22,8 @@ class EmbedController < ApplicationController current_user, limit: SiteSetting.embed_post_limit, exclude_first: true, - exclude_deleted_users: true) + exclude_deleted_users: true, + exclude_hidden: true) @second_post_url = "#{@topic_view.topic.url}/2" if @topic_view @posts_left = 0 diff --git a/lib/topic_view.rb b/lib/topic_view.rb index da72aa5bd23..8a2ea3b8ea8 100644 --- a/lib/topic_view.rb +++ b/lib/topic_view.rb @@ -387,6 +387,7 @@ class TopicView result = filter_post_types(@topic.posts) result = result.with_deleted if @guardian.can_see_deleted_posts? result = @topic.posts.where("user_id IS NOT NULL") if @exclude_deleted_users + result = @topic.posts.where(hidden: false) if @exclude_hidden result end