diff options
author | Joseph Mansy <36427684+yousefmansy1@users.noreply.github.com> | 2023-03-09 12:46:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 21:46:57 +0100 |
commit | ac681687f8afe770edbae439e08d49b472517fc6 (patch) | |
tree | b5e87a71260a67cbca4af54f0835a9fc4abab05e | |
parent | 57ce19150f38842cdf44370b358881dbb83fb20e (diff) | |
download | matterbridge-msglm-ac681687f8afe770edbae439e08d49b472517fc6.tar.gz matterbridge-msglm-ac681687f8afe770edbae439e08d49b472517fc6.tar.bz2 matterbridge-msglm-ac681687f8afe770edbae439e08d49b472517fc6.zip |
Handle messages with link preview not being relayed (whatsapp) (#1970)
Resolves #1840
-rw-r--r-- | bridge/whatsappmulti/handlers.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/whatsappmulti/handlers.go b/bridge/whatsappmulti/handlers.go index 34dce471..95fe8232 100644 --- a/bridge/whatsappmulti/handlers.go +++ b/bridge/whatsappmulti/handlers.go @@ -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() |