chore: fix never resolve promise when downloading expired media (#4012)
Co-authored-by: fallenleavesguy <no@email.com>
This commit is contained in:
parent
5438c2042b
commit
dec1bee842
1 changed files with 3 additions and 1 deletions
|
|
@ -449,7 +449,9 @@ class Message extends Base {
|
|||
|
||||
const result = await this.client.pupPage.evaluate(async (msgId) => {
|
||||
const msg = window.Store.Msg.get(msgId) || (await window.Store.Msg.getMessagesById([msgId]))?.messages?.[0];
|
||||
if (!msg || !msg.mediaData) {
|
||||
|
||||
// REUPLOADING mediaStage means the media is expired and the download button is spinning, cannot be downloaded now
|
||||
if (!msg || !msg.mediaData || msg.mediaData.mediaStage === 'REUPLOADING') {
|
||||
return null;
|
||||
}
|
||||
if (msg.mediaData.mediaStage != 'RESOLVED') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue