summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/message.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/message.go')
-rw-r--r--vendor/go.mau.fi/whatsmeow/message.go10
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})