Skip to content

Commit 03c53c4

Browse files
norkans7Copilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f497ea3 commit 03c53c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

handlers/jasmin/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (h *handler) receiveStatus(ctx context.Context, c courier.Channel, w http.R
6464
return nil, handlers.WriteAndLogRequestError(ctx, h, c, w, r, err)
6565
}
6666

67-
// should have either delivered or err
67+
// prefer message_status when present; otherwise require either dlvrd or err to be set
6868
var reqStatus models.MsgStatus
6969
msgStatus, found := statusMapping[form.MessageStatus]
7070
if found {

handlers/jasmin/handler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var handleTestCases = []IncomingTestCase{
5656
ExpectedStatuses: []ExpectedStatus{{ExternalID: "external1", Status: models.MsgStatusDelivered}},
5757
},
5858
{
59-
Label: "Status Delivered",
59+
Label: "Status Delivered via message_status",
6060
URL: statusURL,
6161
Data: "id=external1&dlvrd=001&message_status=DELIVRD",
6262
ExpectedRespStatus: 200,

0 commit comments

Comments
 (0)