fix: message with inbox and agent details
This commit is contained in:
parent
9c4714b658
commit
30365797c0
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