mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-25 13:39:34 +01:00
Handle messages with link preview not being relayed (whatsapp) (#1970)
Resolves #1840
This commit is contained in:
parent
57ce19150f
commit
ac681687f8
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user