mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FEATURE: Expand truncated posts in the user stream
This commit is contained in:
@ -4,6 +4,7 @@ class AdminUserActionSerializer < ApplicationSerializer
|
||||
:id,
|
||||
:created_at,
|
||||
:post_number,
|
||||
:post_id,
|
||||
:name,
|
||||
:username,
|
||||
:avatar_template,
|
||||
@ -11,6 +12,7 @@ class AdminUserActionSerializer < ApplicationSerializer
|
||||
:slug,
|
||||
:title,
|
||||
:category_id,
|
||||
:truncated,
|
||||
:excerpt,
|
||||
:hidden,
|
||||
:moderator_action,
|
||||
@ -21,6 +23,18 @@ class AdminUserActionSerializer < ApplicationSerializer
|
||||
:action_type
|
||||
)
|
||||
|
||||
def truncated
|
||||
true
|
||||
end
|
||||
|
||||
def post_id
|
||||
object.id
|
||||
end
|
||||
|
||||
def include_truncated?
|
||||
object.excerpt != object.cooked
|
||||
end
|
||||
|
||||
def deleted
|
||||
deleted_at.present?
|
||||
end
|
||||
|
Reference in New Issue
Block a user