fix: update inbox details for text search json
This commit is contained in:
parent
03ba2fa0ce
commit
5088df4c5b
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ json.payload do
|
||||||
json.array! @result[:conversations] do |conversation|
|
json.array! @result[:conversations] do |conversation|
|
||||||
json.partial! 'api/v1/models/conversation', formats: [:json], conversation: conversation
|
json.partial! 'api/v1/models/conversation', formats: [:json], conversation: conversation
|
||||||
json.agent do
|
json.agent do
|
||||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assignee if conversation.assignee.present?
|
json.partial! 'api/v1/models/agent', formats: [:json], resource: conversation.assignee if conversation.try(:assignee).present?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -18,7 +18,7 @@ json.payload do
|
||||||
json.array! @result[:messages] do |message|
|
json.array! @result[:messages] do |message|
|
||||||
json.partial! 'api/v1/models/message', formats: [:json], message: message
|
json.partial! 'api/v1/models/message', formats: [:json], message: message
|
||||||
json.agent do
|
json.agent do
|
||||||
json.partial! 'api/v1/models/agent', formats: [:json], resource: message.conversation.assignee if message.conversation.assignee.present?
|
json.partial! 'api/v1/models/agent', formats: [:json], resource: message.conversation.assignee if message.conversation.try(:assignee).present?
|
||||||
end
|
end
|
||||||
json.inbox do
|
json.inbox do
|
||||||
if message.inbox.present?
|
if message.inbox.present?
|
||||||
|
|
Loading…
Reference in a new issue