From fda05f22629156cc2eae130b501ebced2261ab42 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 5 Sep 2022 21:00:54 +0200 Subject: Update dependencies and fix whatsmeow API changes (#1887) * Update dependencies * Fix whatsmau API changes --- bridge/whatsappmulti/helpers.go | 3 ++- bridge/whatsappmulti/whatsapp.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'bridge/whatsappmulti') diff --git a/bridge/whatsappmulti/helpers.go b/bridge/whatsappmulti/helpers.go index a7cc5c98..5b1ec86c 100644 --- a/bridge/whatsappmulti/helpers.go +++ b/bridge/whatsappmulti/helpers.go @@ -1,3 +1,4 @@ +//go:build whatsappmulti // +build whatsappmulti package bwhatsapp @@ -77,7 +78,7 @@ func (b *Bwhatsapp) getSenderNotify(senderJid types.JID) string { func (b *Bwhatsapp) GetProfilePicThumb(jid string) (*types.ProfilePictureInfo, error) { pjid, _ := types.ParseJID(jid) - info, err := b.wc.GetProfilePictureInfo(pjid, true) + info, err := b.wc.GetProfilePictureInfo(pjid, true, "") if err != nil { return nil, fmt.Errorf("failed to get avatar: %v", err) } diff --git a/bridge/whatsappmulti/whatsapp.go b/bridge/whatsappmulti/whatsapp.go index 6b514451..02eadf15 100644 --- a/bridge/whatsappmulti/whatsapp.go +++ b/bridge/whatsappmulti/whatsapp.go @@ -1,3 +1,4 @@ +//go:build whatsappmulti // +build whatsappmulti package bwhatsapp @@ -234,7 +235,7 @@ func (b *Bwhatsapp) PostDocumentMessage(msg config.Message, filetype string) (st b.Log.Debugf("=> Sending %#v", msg) ID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(groupJID, ID, &message) + _, err = b.wc.SendMessage(context.TODO(), groupJID, ID, &message) return ID, err } @@ -268,7 +269,7 @@ func (b *Bwhatsapp) PostImageMessage(msg config.Message, filetype string) (strin b.Log.Debugf("=> Sending %#v", msg) ID := whatsmeow.GenerateMessageID() - _, err = b.wc.SendMessage(groupJID, ID, &message) + _, err = b.wc.SendMessage(context.TODO(), groupJID, ID, &message) return ID, err } @@ -327,7 +328,7 @@ func (b *Bwhatsapp) Send(msg config.Message) (string, error) { message.Conversation = &text ID := whatsmeow.GenerateMessageID() - _, err := b.wc.SendMessage(groupJID, ID, &message) + _, err := b.wc.SendMessage(context.TODO(), groupJID, ID, &message) return ID, err } -- cgit v1.2.3