mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: don't onebox hidden posts
This commit is contained in:
@ -25,6 +25,7 @@ module Onebox
|
||||
# Post Link
|
||||
post = Post.where(topic_id: route[:topic_id], post_number: route[:post_number].to_i).first
|
||||
return linked unless post
|
||||
return linked if post.hidden
|
||||
return linked unless Guardian.new.can_see?(post)
|
||||
|
||||
topic = post.topic
|
||||
|
Reference in New Issue
Block a user