From 30365797c0bced498854e276b848277c5db93fae Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Fri, 16 Dec 2022 13:18:07 +0530 Subject: [PATCH] fix: message with inbox and agent details --- .../api/v1/accounts/conversations/text_search.json.jbuilder | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/api/v1/accounts/conversations/text_search.json.jbuilder b/app/views/api/v1/accounts/conversations/text_search.json.jbuilder index 0439c1cf9..6572fdd64 100644 --- a/app/views/api/v1/accounts/conversations/text_search.json.jbuilder +++ b/app/views/api/v1/accounts/conversations/text_search.json.jbuilder @@ -17,6 +17,12 @@ json.payload do json.messages do json.array! @result[:messages] do |message| json.partial! 'api/v1/models/message', formats: [:json], message: message + json.agent do + json.partial! 'api/v1/models/agent', formats: [:json], resource: message.conversation.assignee if message.conversation.assignee.present? + end + json.inbox do + json.partial! 'api/v1/models/inbox', formats: [:json], resource: message.inbox if message.inbox.present? + end end end end