Make sms code task use a reference too

- makes the fire text callback behave in consistent way
This commit is contained in:
Martyn Inglis
2016-03-10 15:51:11 +00:00
parent 1f22f2b7cc
commit 2922712f0b
5 changed files with 42 additions and 27 deletions

View File

@@ -51,20 +51,16 @@ class FiretextClient(SmsClient):
def get_name(self):
return self.name
def send_sms(self, to, content, notification_id=None):
def send_sms(self, to, content, reference):
data = {
"apiKey": self.api_key,
"from": self.from_number,
"to": to.replace('+', ''),
"message": content
"message": content,
"reference": reference
}
if notification_id:
data.update({
"reference": notification_id
})
start_time = monotonic()
try:
response = request(