mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
fix: only return undefined for ERROR_* media states
This was causing a regression as of 1.2.5 that caused media files sent by the client to not be properly downloaded cc #111 @stevefold
This commit is contained in:
@@ -200,7 +200,7 @@ class Message extends Base {
|
||||
await msg.downloadMedia(true, 1);
|
||||
}
|
||||
|
||||
if(msg.mediaData.mediaStage != 'RESOLVED') {
|
||||
if(msg.mediaData.mediaStage.includes('ERROR')) {
|
||||
// media could not be downloaded
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user