fix: Display assignee only if the assignee has access to the account (#1500)

This commit is contained in:
Pranav Raj S 2020-12-08 22:49:47 +05:30 committed by GitHub
parent 2880f4942a
commit 870a24126e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ json.meta do
json.partial! 'api/v1/models/contact.json.jbuilder', resource: conversation.contact json.partial! 'api/v1/models/contact.json.jbuilder', resource: conversation.contact
end end
json.channel conversation.inbox.try(:channel_type) json.channel conversation.inbox.try(:channel_type)
if conversation.assignee if conversation.assignee&.account
json.assignee do json.assignee do
json.partial! 'api/v1/models/agent.json.jbuilder', resource: conversation.assignee json.partial! 'api/v1/models/agent.json.jbuilder', resource: conversation.assignee
end end