feat: Tag agents in a private note (#1688)
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -10,9 +10,16 @@ json.data do
|
||||
json.id notification.id
|
||||
json.notification_type notification.notification_type
|
||||
json.push_message_title notification.push_message_title
|
||||
json.primary_actor_type notification.primary_actor_type
|
||||
json.primary_actor_id notification.primary_actor_id
|
||||
json.primary_actor notification.primary_actor&.push_event_data
|
||||
# TODO: front end assumes primary actor to be conversation. should fix in future
|
||||
if notification.notification_type == 'conversation_mention'
|
||||
json.primary_actor_type 'Conversation'
|
||||
json.primary_actor_id notification.primary_actor.conversation_id
|
||||
json.primary_actor notification.primary_actor&.conversation&.push_event_data
|
||||
else
|
||||
json.primary_actor_type notification.primary_actor_type
|
||||
json.primary_actor_id notification.primary_actor_id
|
||||
json.primary_actor notification.primary_actor&.push_event_data
|
||||
end
|
||||
json.read_at notification.read_at
|
||||
json.secondary_actor notification.secondary_actor&.push_event_data
|
||||
json.user notification.user&.push_event_data
|
||||
|
||||
Reference in New Issue
Block a user