From 97088a4af1027dd75f7dda92458198a782a45b41 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Fri, 27 May 2016 12:28:58 +0100 Subject: [PATCH] Added a comment to explain how the delivery receipt will affect the notification status. --- app/clients/sms/firetext.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/clients/sms/firetext.py b/app/clients/sms/firetext.py index 430bc2ec4..2d77c777d 100644 --- a/app/clients/sms/firetext.py +++ b/app/clients/sms/firetext.py @@ -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',