@@ -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?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user