fix: message with inbox and agent details
This commit is contained in:
parent
918eda22a6
commit
9681827776
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue