mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Use smaller messages for moderator actions.
This commit is contained in:
@@ -46,7 +46,7 @@ class AdminPostSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def moderator_action
|
||||
object.post_type == Post.types[:moderator_action]
|
||||
object.post_type == Post.types[:moderator_action] || object.post_type == Post.types[:small_action]
|
||||
end
|
||||
|
||||
def deleted_by
|
||||
|
||||
@@ -57,7 +57,8 @@ class PostSerializer < BasicPostSerializer
|
||||
:wiki,
|
||||
:user_custom_fields,
|
||||
:static_doc,
|
||||
:via_email
|
||||
:via_email,
|
||||
:action_code
|
||||
|
||||
def initialize(object, opts)
|
||||
super(object, opts)
|
||||
@@ -281,6 +282,10 @@ class PostSerializer < BasicPostSerializer
|
||||
scope.is_staff? ? object.version : object.public_version
|
||||
end
|
||||
|
||||
def include_action_code?
|
||||
object.action_code.present?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def post_actions
|
||||
|
||||
@@ -68,7 +68,7 @@ class UserActionSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def moderator_action
|
||||
object.post_type == Post.types[:moderator_action]
|
||||
object.post_type == Post.types[:moderator_action] || object.post_type == Post.types[:small_action]
|
||||
end
|
||||
|
||||
def include_reply_to_post_number?
|
||||
|
||||
Reference in New Issue
Block a user