mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -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
|
||||||
FIRETEXT_API_KEY = os.environ.get("FIRETEXT_API_KEY", "placeholder")
|
FIRETEXT_API_KEY = os.environ.get("FIRETEXT_API_KEY", "placeholder")
|
||||||
FIRETEXT_INTERNATIONAL_API_KEY = os.environ.get("FIRETEXT_INTERNATIONAL_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
|
# Use notify.sandbox.10x sending domain unless overwritten by environment
|
||||||
NOTIFY_EMAIL_DOMAIN = 'notify.sandbox.10x.gsa.gov'
|
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:
|
try:
|
||||||
post_data = sns_notification_handler(request.data, request.headers)
|
post_data = sns_notification_handler(request.data, request.headers)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user