fix: Manage Twilio SMS channel via inbox API (#11457)
- Currently Chatwoot manages Twilio Inbox creation in a separate controller , We want to move this to inboxes api so that we have a unified API for inbox related changes --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -30,6 +30,11 @@ class Channel::TwilioSms < ApplicationRecord
|
||||
# The same parameter is used to store api_key_secret if api_key authentication is opted
|
||||
validates :auth_token, presence: true
|
||||
|
||||
EDITABLE_ATTRS = [
|
||||
:account_sid,
|
||||
:auth_token
|
||||
].freeze
|
||||
|
||||
# Must have _one_ of messaging_service_sid _or_ phone_number, and messaging_service_sid is preferred
|
||||
validates :messaging_service_sid, uniqueness: true, presence: true, unless: :phone_number?
|
||||
validates :phone_number, absence: true, if: :messaging_service_sid?
|
||||
|
||||
Reference in New Issue
Block a user