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:
Pedro Lopez
2020-04-02 02:24:12 -04:00
parent c3ba79464b
commit 001c045c08

View File

@@ -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;
}