Twilio client takes a 'to' number not a notification

This commit is contained in:
Martyn Inglis
2016-02-17 09:12:13 +00:00
parent a2341be0e2
commit 1311af5920

View File

@@ -23,11 +23,11 @@ class TwilioClient(SmsClient):
config.config.get('TWILIO_AUTH_TOKEN'))
self.from_number = config.config.get('TWILIO_NUMBER')
def send_sms(self, notification, content):
def send_sms(self, to, content):
try:
response = self.client.messages.create(
body=content,
to=notification['to'],
to=to,
from_=self.from_number
)
return response.sid