chore: Provider APIs for SMS Channel - Bandwidth (#3889)

fixes: #3888
This commit is contained in:
Sojan Jose
2022-02-03 15:22:13 -08:00
committed by GitHub
parent fba7f40bee
commit cf10f3d03b
40 changed files with 879 additions and 51 deletions

View File

@@ -14,6 +14,8 @@ class Contacts::ContactableInboxesService
twilio_contactable_inbox(inbox)
when 'Channel::Whatsapp'
whatsapp_contactable_inbox(inbox)
when 'Channel::Sms'
sms_contactable_inbox(inbox)
when 'Channel::Email'
email_contactable_inbox(inbox)
when 'Channel::Api'
@@ -52,6 +54,12 @@ class Contacts::ContactableInboxesService
{ source_id: @contact.phone_number.delete('+'), inbox: inbox }
end
def sms_contactable_inbox(inbox)
return unless @contact.phone_number
{ source_id: @contact.phone_number, inbox: inbox }
end
def twilio_contactable_inbox(inbox)
return if @contact.phone_number.blank?