config flag for turning off inbound SMS replies

This commit is contained in:
jimmoffet
2022-10-07 17:25:31 -07:00
parent 97aa118fee
commit 863dfe39ba
2 changed files with 9 additions and 0 deletions

View File

@@ -38,6 +38,12 @@ def receive_sns_sms():
}
"""
# Whether or not to ignore inbound SMS replies
if not current_app.config['RECEIVE_INBOUND_SMS']:
return jsonify(
result="success", message="SMS-SNS callback succeeded"
), 200
try:
post_data = sns_notification_handler(request.data, request.headers)
except Exception as e: