mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
FIX: Don't include hidden posts in embedded comments
This commit is contained in:
parent
2cc6efba8c
commit
664f1913c8
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue