diff options
author | Wim <wim@42.be> | 2019-10-27 01:45:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-27 01:45:57 +0200 |
commit | 0bc159341dbb4aece685ce373e9bc0b6b32984e7 (patch) | |
tree | ed67d8e03541b2cb61ab161771f1c6e41070d372 /vendor/github.com/Rhymen/go-whatsapp/media.go | |
parent | 45bf1fd63a62b46fc80fe5143e667f6779705a0d (diff) | |
download | matterbridge-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/media.go')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/media.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/media.go b/vendor/github.com/Rhymen/go-whatsapp/media.go index 1bf729bb..b15b9ae2 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/media.go +++ b/vendor/github.com/Rhymen/go-whatsapp/media.go @@ -74,6 +74,12 @@ func downloadMedia(url string) (file []byte, mac []byte, err error) { return nil, nil, err } if resp.StatusCode != 200 { + if resp.StatusCode == 404 { + return nil, nil, ErrMediaDownloadFailedWith404 + } + if resp.StatusCode == 410 { + return nil, nil, ErrMediaDownloadFailedWith410 + } return nil, nil, fmt.Errorf("download failed with status code %d", resp.StatusCode) } defer resp.Body.Close() |