fix method downloadMedia when not found msg (#1852)

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
tofers
2023-01-15 21:35:26 +03:00
committed by GitHub
parent bd0e27a0d0
commit bd192993b7

View File

@@ -386,7 +386,9 @@ class Message extends Base {
const result = await this.client.pupPage.evaluate(async (msgId) => { const result = await this.client.pupPage.evaluate(async (msgId) => {
const msg = window.Store.Msg.get(msgId); const msg = window.Store.Msg.get(msgId);
if (!msg) {
return undefined;
}
if (msg.mediaData.mediaStage != 'RESOLVED') { if (msg.mediaData.mediaStage != 'RESOLVED') {
// try to resolve media // try to resolve media
await msg.downloadMedia({ await msg.downloadMedia({