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
commit bd192993b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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({