diff options
author | Wim <wim@42.be> | 2022-04-25 23:50:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 23:50:10 +0200 |
commit | 67adad3e08fe17d5f7e87468ea47aa76e1662255 (patch) | |
tree | 91314fac90d39254e66ae794decfcd21c10a7b20 /vendor/go.mau.fi/whatsmeow/message.go | |
parent | 2fca3c756373577eab4e0120ccce62eecc1f5ad8 (diff) | |
download | matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.tar.gz matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.tar.bz2 matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.zip |
Update dependencies (#1813)
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/message.go')
-rw-r--r-- | vendor/go.mau.fi/whatsmeow/message.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/message.go b/vendor/go.mau.fi/whatsmeow/message.go index 85ccb12b..36ccfcad 100644 --- a/vendor/go.mau.fi/whatsmeow/message.go +++ b/vendor/go.mau.fi/whatsmeow/message.go @@ -110,12 +110,20 @@ func (cli *Client) parseMessageInfo(node *waBinary.Node) (*types.MessageInfo, er info.PushName, _ = node.Attrs["notify"].(string) info.Category, _ = node.Attrs["category"].(string) + for _, child := range node.GetChildren() { + if child.Tag == "multicast" { + info.Multicast = true + } else if mediaType, ok := child.AttrGetter().GetString("mediatype", false); ok { + info.MediaType = mediaType + } + } + return &info, nil } func (cli *Client) decryptMessages(info *types.MessageInfo, node *waBinary.Node) { go cli.sendAck(node) - if len(node.GetChildrenByTag("unavailable")) == len(node.GetChildren()) { + if len(node.GetChildrenByTag("unavailable")) > 0 && len(node.GetChildrenByTag("enc")) == 0 { cli.Log.Warnf("Unavailable message %s from %s", info.ID, info.SourceString()) go cli.sendRetryReceipt(node, true) cli.dispatchEvent(&events.UndecryptableMessage{Info: *info, IsUnavailable: true}) |