From 918eda22a66583631a8de67f9072314d09d149d3 Mon Sep 17 00:00:00 2001 From: Tejaswini Chile Date: Fri, 16 Dec 2022 13:10:44 +0530 Subject: [PATCH] fix: added json for agents details in conversation --- .../api/v1/accounts/conversations/text_search.json.jbuilder | 3 +++ 1 file changed, 3 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 b49bd445e..0439c1cf9 100644 --- a/app/views/api/v1/accounts/conversations/text_search.json.jbuilder +++ b/app/views/api/v1/accounts/conversations/text_search.json.jbuilder @@ -2,6 +2,9 @@ json.payload do json.conversations do json.array! @result[:conversations] do |conversation| json.partial! 'api/v1/models/conversation', formats: [:json], conversation: conversation + json.agent do + json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assignee if conversation.assignee.present? + end end end