From 001c045c0807aa605bcd5267412f5a033b626d7e Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Thu, 2 Apr 2020 02:24:12 -0400 Subject: [PATCH] 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 --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 084d22c..960ff87 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -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; }