From 1c900043cb97eb31c7cadbdbd79b4f8aba1cf2b5 Mon Sep 17 00:00:00 2001 From: Aldino Kemal Date: Mon, 12 Feb 2024 05:46:32 +0700 Subject: [PATCH] fix: invalid forwarded logic --- src/pkg/whatsapp/whatsapp.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pkg/whatsapp/whatsapp.go b/src/pkg/whatsapp/whatsapp.go index 5e4bdcd..20eb02a 100644 --- a/src/pkg/whatsapp/whatsapp.go +++ b/src/pkg/whatsapp/whatsapp.go @@ -302,11 +302,9 @@ func forwardToWebhook(evt *events.Message) error { } } - var forwarded any + var forwarded bool if evt.Message.ExtendedTextMessage != nil && evt.Message.ExtendedTextMessage.ContextInfo != nil { - if isForwarded := evt.Message.ExtendedTextMessage.ContextInfo.GetIsForwarded(); !isForwarded { - forwarded = nil - } + forwarded = evt.Message.ExtendedTextMessage.ContextInfo.GetIsForwarded() } var waReaction evtReaction