Skip to content

Commit

Permalink
fix: verify context nil error on extMsg (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
GalShnapp authored Oct 31, 2023
1 parent 99ba1b4 commit c290203
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pkg/whatsapp/whatsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ func forwardToWebhook(evt *events.Message) error {
message.Text = extendedMessage
}


var quotedmessage any
if evt.Message.ExtendedTextMessage != nil {
if evt.Message.ExtendedTextMessage != nil && evt.Message.ExtendedTextMessage.ContextInfo != nil {
if conversation := evt.Message.ExtendedTextMessage.ContextInfo.QuotedMessage.GetConversation(); conversation != "" {
quotedmessage = conversation
}
Expand Down

0 comments on commit c290203

Please sign in to comment.