diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/VoiceConfigurationPage.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/VoiceConfigurationPage.vue index ab9a147a1..c3d429e3c 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/VoiceConfigurationPage.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/VoiceConfigurationPage.vue @@ -34,7 +34,7 @@ export default { return !!this.inbox.api_key_sid; }, hasExistingCredentials() { - return this.hasApiKeySid; + return this.hasApiKeySid && !!this.inbox.has_api_key_secret; }, needsCredentials() { return ( diff --git a/app/views/api/v1/models/_inbox.json.jbuilder b/app/views/api/v1/models/_inbox.json.jbuilder index d54cf3545..facb187a8 100644 --- a/app/views/api/v1/models/_inbox.json.jbuilder +++ b/app/views/api/v1/models/_inbox.json.jbuilder @@ -135,6 +135,7 @@ end if resource.twilio? && resource.channel.respond_to?(:voice_enabled?) json.voice_enabled resource.channel.voice_enabled? json.voice_configured resource.channel.try(:twiml_app_sid).present? + json.has_api_key_secret resource.channel.try(:api_key_secret).present? if resource.channel.try(:twiml_app_sid).present? json.voice_call_webhook_url resource.channel.try(:voice_call_webhook_url) json.voice_status_webhook_url resource.channel.try(:voice_status_webhook_url)