forked from jshiffer/matterbridge
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
|
// nolint:nestif
|
||||||
if msg.GetExtendedTextMessage() == nil {
|
if msg.GetExtendedTextMessage() == nil {
|
||||||
text = msg.GetConversation()
|
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 {
|
} else {
|
||||||
text = msg.GetExtendedTextMessage().GetText()
|
text = msg.GetExtendedTextMessage().GetText()
|
||||||
ci := msg.GetExtendedTextMessage().GetContextInfo()
|
ci := msg.GetExtendedTextMessage().GetContextInfo()
|
||||||
|
Loading…
Reference in New Issue
Block a user