chore: Add controllers for conversation participants (#6462)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com> Co-authored-by: Sojan Jose <sojan@chatwoot.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
json.array! @participants do |participant|
|
||||
json.partial! 'api/v1/models/agent', format: :json, resource: participant.user
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
json.array! @participants do |participant|
|
||||
json.partial! 'api/v1/models/agent', format: :json, resource: participant.user
|
||||
end
|
||||
@@ -11,7 +11,11 @@ json.data do
|
||||
json.notification_type notification.notification_type
|
||||
json.push_message_title notification.push_message_title
|
||||
# TODO: front end assumes primary actor to be conversation. should fix in future
|
||||
if %w[assigned_conversation_new_message conversation_mention].include? notification.notification_type
|
||||
if %w[
|
||||
assigned_conversation_new_message
|
||||
participating_conversation_new_message
|
||||
conversation_mention
|
||||
].include? notification.notification_type
|
||||
json.primary_actor_type 'Conversation'
|
||||
json.primary_actor_id notification.conversation.id
|
||||
json.primary_actor notification.conversation.push_event_data
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<p>Hi {{user.available_name}},</p>
|
||||
|
||||
<p>You have received a new message in a conversation you are participating.</p>
|
||||
|
||||
<p>Click <a href="{{action_url}}">here</a> to get cracking.</p>
|
||||
Reference in New Issue
Block a user