mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Small actions should show descriptions on the user stream
This commit is contained in:
@@ -22,7 +22,8 @@ class UserActionSerializer < ApplicationSerializer
|
||||
:title,
|
||||
:deleted,
|
||||
:hidden,
|
||||
:moderator_action,
|
||||
:post_type,
|
||||
:action_code,
|
||||
:edit_reason,
|
||||
:category_id,
|
||||
:uploaded_avatar_id,
|
||||
@@ -32,7 +33,7 @@ class UserActionSerializer < ApplicationSerializer
|
||||
|
||||
def excerpt
|
||||
cooked = object.cooked || PrettyText.cook(object.raw)
|
||||
PrettyText.excerpt(cooked, 300, { keep_emojis: true }) if cooked
|
||||
PrettyText.excerpt(cooked, 300, keep_emojis: true) if cooked
|
||||
end
|
||||
|
||||
def avatar_template
|
||||
@@ -67,10 +68,6 @@ class UserActionSerializer < ApplicationSerializer
|
||||
object.title.present?
|
||||
end
|
||||
|
||||
def moderator_action
|
||||
object.post_type == Post.types[:moderator_action] || object.post_type == Post.types[:small_action]
|
||||
end
|
||||
|
||||
def include_reply_to_post_number?
|
||||
object.action_type == UserAction::REPLY
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user