Refactor code to use inbound_numbers if set

This commit is contained in:
Ken Tsang
2017-08-14 19:47:09 +01:00
parent e14fa2d87e
commit 667ee57a35
8 changed files with 103 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ def send_sms_to_provider(notification):
to=validate_and_format_phone_number(notification.to, international=notification.international),
content=str(template),
reference=str(notification.id),
sender=service.sms_sender or current_app.config['FROM_NUMBER']
sender=service.get_inbound_number()
)
except Exception as e:
dao_toggle_sms_provider(provider.name)