mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
restore international numbers
This commit is contained in:
@@ -48,7 +48,9 @@ class AwsSnsClient(SmsClient):
|
||||
|
||||
def send_sms(self, to, content, reference, sender=None, international=False):
|
||||
matched = False
|
||||
for match in phonenumbers.PhoneNumberMatcher(to, "US"):
|
||||
if "+" not in to:
|
||||
to = f"+{to}"
|
||||
for match in phonenumbers.PhoneNumberMatcher(to, None):
|
||||
matched = True
|
||||
to = phonenumbers.format_number(
|
||||
match.number, phonenumbers.PhoneNumberFormat.E164
|
||||
|
||||
Reference in New Issue
Block a user