modify inbound notif processing

This commit is contained in:
jimmoffet
2022-10-03 09:05:34 -07:00
parent 06c2727e65
commit 8cb6f60f04
22 changed files with 665 additions and 44 deletions

View File

@@ -30,9 +30,10 @@ def post_inbound_sms_for_service(service_id):
form = validate(request.get_json(), get_inbound_sms_for_service_schema)
user_number = form.get('phone_number')
if user_number:
# we use this to normalise to an international phone number - but this may fail if it's an alphanumeric
user_number = try_validate_and_format_phone_number(user_number, international=True)
# TODO update this for US formatting
# if user_number:
# # we use this to normalise to an international phone number - but this may fail if it's an alphanumeric
# user_number = try_validate_and_format_phone_number(user_number, international=True)
inbound_data_retention = fetch_service_data_retention_by_notification_type(service_id, 'sms')
limit_days = inbound_data_retention.days_of_retention if inbound_data_retention else 7