Update dependencies (#1813)

This commit is contained in:
Wim
2022-04-25 23:50:10 +02:00
committed by GitHub
parent 2fca3c7563
commit 67adad3e08
288 changed files with 266038 additions and 3755 deletions

View File

@@ -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})