fix: message with inbox and agent details

This commit is contained in:
Tejaswini Chile 2022-12-16 13:18:07 +05:30
parent 9c4714b658
commit 30365797c0

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