summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/Rhymen/go-whatsapp/contact.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-10-27 01:45:57 +0200
committerGitHub <noreply@github.com>2019-10-27 01:45:57 +0200
commit0bc159341dbb4aece685ce373e9bc0b6b32984e7 (patch)
treeed67d8e03541b2cb61ab161771f1c6e41070d372 /vendor/github.com/Rhymen/go-whatsapp/contact.go
parent45bf1fd63a62b46fc80fe5143e667f6779705a0d (diff)
downloadmatterbridge-msglm-0bc159341dbb4aece685ce373e9bc0b6b32984e7.tar.gz
matterbridge-msglm-0bc159341dbb4aece685ce373e9bc0b6b32984e7.tar.bz2
matterbridge-msglm-0bc159341dbb4aece685ce373e9bc0b6b32984e7.zip
Update vendor (#932)
* Update vendor * Fix godiscord api change
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/contact.go')
-rw-r--r--vendor/github.com/Rhymen/go-whatsapp/contact.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/contact.go b/vendor/github.com/Rhymen/go-whatsapp/contact.go
index 9faaf5cc..bcaf8734 100644
--- a/vendor/github.com/Rhymen/go-whatsapp/contact.go
+++ b/vendor/github.com/Rhymen/go-whatsapp/contact.go
@@ -51,6 +51,10 @@ func (wac *Conn) LoadMessagesAfter(jid, messageId string, count int) (*binary.No
return wac.query("message", jid, messageId, "after", "true", "", count, 0)
}
+func (wac *Conn) LoadMediaInfo(jid, messageId, owner string) (*binary.Node, error) {
+ return wac.query("media", jid, messageId, "", owner, "", 0, 0)
+}
+
func (wac *Conn) Presence(jid string, presence Presence) (<-chan string, error) {
ts := time.Now().Unix()
tag := fmt.Sprintf("%d.--%d", ts, wac.msgCount)
@@ -163,7 +167,12 @@ func (wac *Conn) query(t, jid, messageId, kind, owner, search string, count, pag
n.Attributes["page"] = strconv.Itoa(page)
}
- ch, err := wac.writeBinary(n, group, ignore, tag)
+ metric := group
+ if t == "media" {
+ metric = queryMedia
+ }
+
+ ch, err := wac.writeBinary(n, metric, ignore, tag)
if err != nil {
return nil, err
}