From b8df28c8a343cf6132d5c8e47b0097e68b8a9586 Mon Sep 17 00:00:00 2001 From: Muhsin <12408980+muhsin-k@users.noreply.github.com> Date: Tue, 14 Apr 2026 14:36:44 +0400 Subject: [PATCH] chore: restrict TwilioSms attrs to SMS medium --- .../enterprise/api/v1/accounts/inboxes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/app/controllers/enterprise/api/v1/accounts/inboxes_controller.rb b/enterprise/app/controllers/enterprise/api/v1/accounts/inboxes_controller.rb index 0f4dc456f..f9d828806 100644 --- a/enterprise/app/controllers/enterprise/api/v1/accounts/inboxes_controller.rb +++ b/enterprise/app/controllers/enterprise/api/v1/accounts/inboxes_controller.rb @@ -33,7 +33,7 @@ module Enterprise::Api::V1::Accounts::InboxesController def get_channel_attributes(channel_type) attrs = super - attrs += [:voice_enabled, :api_key_sid, :api_key_secret] if channel_type == 'Channel::TwilioSms' + attrs += [:voice_enabled, :api_key_sid, :api_key_secret] if channel_type == 'Channel::TwilioSms' && @inbox&.channel&.medium == 'sms' attrs end