Skip to content

Commit

Permalink
Bugfix, handle messages with link preview not being relayed
Browse files Browse the repository at this point in the history
Resolves 42wim#1840
  • Loading branch information
yousefmansy1 committed Feb 16, 2023
1 parent ded55b7 commit 476205c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridge/whatsappmulti/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func (b *Bwhatsapp) handleTextMessage(messageInfo types.MessageInfo, msg *proto.
// nolint:nestif
if msg.GetExtendedTextMessage() == nil {
text = msg.GetConversation()
} else if msg.GetExtendedTextMessage().GetContextInfo() == nil {
// Handle pure text message with a link preview
// A pure text message with a link preview acts as an extended text message but will not contain any context info
text = msg.GetExtendedTextMessage().GetText()
} else {
text = msg.GetExtendedTextMessage().GetText()
ci := msg.GetExtendedTextMessage().GetContextInfo()
Expand Down

0 comments on commit 476205c

Please sign in to comment.