From 6822bb3e138ed9a6793bdf4dec4780c148109152 Mon Sep 17 00:00:00 2001 From: Robi9 Date: Thu, 2 Mar 2023 17:37:17 -0300 Subject: [PATCH] Add read status --- handlers/facebookapp/facebookapp.go | 2 +- handlers/whatsapp/whatsapp.go | 2 +- status.go | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/facebookapp/facebookapp.go b/handlers/facebookapp/facebookapp.go index 00fb27ba1..cc72f3e15 100644 --- a/handlers/facebookapp/facebookapp.go +++ b/handlers/facebookapp/facebookapp.go @@ -62,7 +62,7 @@ const ( var waStatusMapping = map[string]courier.MsgStatusValue{ "sent": courier.MsgSent, "delivered": courier.MsgDelivered, - "read": courier.MsgDelivered, + "read": courier.MsgRead, "failed": courier.MsgFailed, } diff --git a/handlers/whatsapp/whatsapp.go b/handlers/whatsapp/whatsapp.go index 5848720fe..2bfe7db4e 100644 --- a/handlers/whatsapp/whatsapp.go +++ b/handlers/whatsapp/whatsapp.go @@ -372,7 +372,7 @@ var waStatusMapping = map[string]courier.MsgStatusValue{ "sending": courier.MsgWired, "sent": courier.MsgSent, "delivered": courier.MsgDelivered, - "read": courier.MsgDelivered, + "read": courier.MsgRead, "failed": courier.MsgFailed, } diff --git a/status.go b/status.go index d02ac2c75..a211ab402 100644 --- a/status.go +++ b/status.go @@ -14,6 +14,7 @@ const ( MsgErrored MsgStatusValue = "E" MsgDelivered MsgStatusValue = "D" MsgFailed MsgStatusValue = "F" + MsgRead MsgStatusValue = "V" NilMsgStatus MsgStatusValue = "" )