summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/download.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/download.go')
-rw-r--r--vendor/go.mau.fi/whatsmeow/download.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/download.go b/vendor/go.mau.fi/whatsmeow/download.go
index 99fd3648..e9bedd45 100644
--- a/vendor/go.mau.fi/whatsmeow/download.go
+++ b/vendor/go.mau.fi/whatsmeow/download.go
@@ -192,10 +192,10 @@ func (cli *Client) Download(msg DownloadableMessage) ([]byte, error) {
var isWebWhatsappNetURL bool
if ok {
url = urlable.GetUrl()
- isWebWhatsappNetURL = strings.HasPrefix(urlable.GetUrl(), "https://web.whatsapp.net")
+ isWebWhatsappNetURL = strings.HasPrefix(url, "https://web.whatsapp.net")
}
if len(url) > 0 && !isWebWhatsappNetURL {
- return cli.downloadAndDecrypt(urlable.GetUrl(), msg.GetMediaKey(), mediaType, getSize(msg), msg.GetFileEncSha256(), msg.GetFileSha256())
+ return cli.downloadAndDecrypt(url, msg.GetMediaKey(), mediaType, getSize(msg), msg.GetFileEncSha256(), msg.GetFileSha256())
} else if len(msg.GetDirectPath()) > 0 {
return cli.DownloadMediaWithPath(msg.GetDirectPath(), msg.GetFileEncSha256(), msg.GetFileSha256(), msg.GetMediaKey(), getSize(msg), mediaType, mediaTypeToMMSType[mediaType])
} else {