mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-18 05:28:49 -04:00
@@ -1,4 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
|
import os
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from urllib import parse
|
from urllib import parse
|
||||||
|
|
||||||
@@ -104,7 +105,9 @@ def send_sms_to_provider(notification):
|
|||||||
recipient_lookup = f"+{recipient}"
|
recipient_lookup = f"+{recipient}"
|
||||||
else:
|
else:
|
||||||
recipient_lookup = recipient
|
recipient_lookup = recipient
|
||||||
if recipient_lookup in current_app.config["SIMULATED_SMS_NUMBERS"]:
|
if recipient_lookup in current_app.config[
|
||||||
|
"SIMULATED_SMS_NUMBERS"
|
||||||
|
] and os.getenv("NOTIFY_ENVIRONMENT") in ["development", "test"]:
|
||||||
current_app.logger.info(hilite("#validate-phone-number fired"))
|
current_app.logger.info(hilite("#validate-phone-number fired"))
|
||||||
aws_pinpoint_client.validate_phone_number("01", recipient)
|
aws_pinpoint_client.validate_phone_number("01", recipient)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user