Added a comment to explain how the delivery receipt will affect the notification status.

This commit is contained in:
Rebecca Law
2016-05-27 12:28:58 +01:00
parent 2bfa9b7e10
commit 97088a4af1

View File

@@ -10,6 +10,11 @@ from app.clients import STATISTICS_DELIVERED, STATISTICS_FAILURE
logger = logging.getLogger(__name__)
# Firetext will send a delivery receipt with three different status codes.
# The `firetext_response` maps these codes to the notification statistics status and notification status.
# If we get a pending (status = 2) delivery receipt followed by a declined (status = 1) delivery receipt we will set
# the notification status to temporary-failure rather than permanent failure.
# See the code in the notification_dao.update_notifications_status_by_id
firetext_responses = {
'0': {
"message": 'Delivered',