Skip to content

Commit

Permalink
fix: invalid forwarded logic
Browse files Browse the repository at this point in the history
  • Loading branch information
aldinokemal committed Feb 11, 2024
1 parent 44b7c13 commit 1c90004
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pkg/whatsapp/whatsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 1c90004

@traysh
Copy link

@traysh traysh commented on 1c90004 Feb 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.