mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Hide deleted posts by default for staff
This commit is contained in:
@@ -39,6 +39,7 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
:highest_post_number,
|
||||
:last_read_post_number,
|
||||
:deleted_by,
|
||||
:has_deleted,
|
||||
:actions_summary,
|
||||
:expandable_first_post
|
||||
|
||||
@@ -177,6 +178,14 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
result
|
||||
end
|
||||
|
||||
def has_deleted
|
||||
object.has_deleted?
|
||||
end
|
||||
|
||||
def include_has_deleted?
|
||||
object.guardian.can_see_deleted_posts?
|
||||
end
|
||||
|
||||
def expandable_first_post
|
||||
true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user