mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
config flag for turning off inbound SMS replies
This commit is contained in:
@@ -113,6 +113,9 @@ class Config(object):
|
||||
# Firetext API Key
|
||||
FIRETEXT_API_KEY = os.environ.get("FIRETEXT_API_KEY", "placeholder")
|
||||
FIRETEXT_INTERNATIONAL_API_KEY = os.environ.get("FIRETEXT_INTERNATIONAL_API_KEY", "placeholder")
|
||||
|
||||
# Whether to ignore POSTs from SNS for replies to SMS we sent
|
||||
RECEIVE_INBOUND_SMS = False
|
||||
|
||||
# Use notify.sandbox.10x sending domain unless overwritten by environment
|
||||
NOTIFY_EMAIL_DOMAIN = 'notify.sandbox.10x.gsa.gov'
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user