mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Twilio client takes a 'to' number not a notification
This commit is contained in:
@@ -23,11 +23,11 @@ class TwilioClient(SmsClient):
|
|||||||
config.config.get('TWILIO_AUTH_TOKEN'))
|
config.config.get('TWILIO_AUTH_TOKEN'))
|
||||||
self.from_number = config.config.get('TWILIO_NUMBER')
|
self.from_number = config.config.get('TWILIO_NUMBER')
|
||||||
|
|
||||||
def send_sms(self, notification, content):
|
def send_sms(self, to, content):
|
||||||
try:
|
try:
|
||||||
response = self.client.messages.create(
|
response = self.client.messages.create(
|
||||||
body=content,
|
body=content,
|
||||||
to=notification['to'],
|
to=to,
|
||||||
from_=self.from_number
|
from_=self.from_number
|
||||||
)
|
)
|
||||||
return response.sid
|
return response.sid
|
||||||
|
|||||||
Reference in New Issue
Block a user