diff --git a/app/views/api/v1/models/_inbox.json.jbuilder b/app/views/api/v1/models/_inbox.json.jbuilder index ea0bbae7852c8..d831497983561 100644 --- a/app/views/api/v1/models/_inbox.json.jbuilder +++ b/app/views/api/v1/models/_inbox.json.jbuilder @@ -108,9 +108,9 @@ if resource.whatsapp? json.message_templates resource.channel.try(:message_templates) json.provider_config resource.channel.try(:provider_config) if Current.account_user&.administrator? unless Current.account_user&.administrator? - json.provider_config = { - wavoip_token: resource.channel.try(:provider_config).try(:wavoip_token) - } + provider_config = { wavoip_token: (resource.channel.try(:provider_config) || {})['wavoip_token'] } + puts ">>>>>>>> 1 #{provider_config}" + json.provider_config provider_config end end