feat: hide tokens and password on contact inbox payloads (#10888)

Contact Inbox object contained unnecessary attributes which will be removed under this PR.
This commit is contained in:
Shivam Mishra
2025-02-21 10:52:12 +05:30
committed by GitHub
parent f3b8777ebf
commit 27f7e0921e
4 changed files with 41 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
json.source_id resource.source_id
json.inbox do
json.partial! 'api/v1/models/inbox', formats: [:json], resource: resource.inbox
json.partial! 'api/v1/models/inbox_slim', formats: [:json], resource: resource.inbox
end

View File

@@ -0,0 +1,7 @@
json.id resource.id
json.avatar_url resource.try(:avatar_url)
json.channel_id resource.channel_id
json.name resource.name
json.channel_type resource.channel_type
json.provider resource.channel.try(:provider)
json.email resource.channel.try(:email) if resource.email?