mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add small action post when adding/removing users in messages
This commit is contained in:
@@ -62,7 +62,8 @@ class PostSerializer < BasicPostSerializer
|
||||
:user_custom_fields,
|
||||
:static_doc,
|
||||
:via_email,
|
||||
:action_code
|
||||
:action_code,
|
||||
:action_code_who
|
||||
|
||||
def initialize(object, opts)
|
||||
super(object, opts)
|
||||
@@ -313,6 +314,14 @@ class PostSerializer < BasicPostSerializer
|
||||
object.action_code.present?
|
||||
end
|
||||
|
||||
def action_code_who
|
||||
post_custom_fields["action_code_who"]
|
||||
end
|
||||
|
||||
def include_action_code_who?
|
||||
include_action_code? && action_code_who.present?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def post_actions
|
||||
|
||||
Reference in New Issue
Block a user