fix: message with inbox and agent details

This commit is contained in:
Tejaswini Chile 2022-12-16 13:18:07 +05:30
parent 918eda22a6
commit 9681827776

View file

@ -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