mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Basic (Very basic) implementation of the fire text API.
[https://www.firetext.co.uk/docs#sendingsms](https://www.firetext.co.uk/docs#sendingsms) Not to be merged. This API has a limit on it at the moment that will need to be removed before it is used in anger.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from app import notify_celery, twilio_client, encryption
|
||||
from app import notify_celery, twilio_client, encryption, firetext_client
|
||||
from app.clients.sms.twilio import TwilioClientException
|
||||
from app.dao.templates_dao import get_model_templates
|
||||
from app.dao.notifications_dao import save_notification
|
||||
@@ -24,6 +24,7 @@ def send_sms(service_id, notification_id, encrypted_notification):
|
||||
|
||||
try:
|
||||
twilio_client.send_sms(notification['to'], template.content)
|
||||
firetext_client.send_sms(notification['to'], template.content)
|
||||
except TwilioClientException as e:
|
||||
current_app.logger.debug(e)
|
||||
save_notification(notification_db_object, {"status": "failed"})
|
||||
|
||||
Reference in New Issue
Block a user