Handle FileReferenceExpiredError during download

May fix #4341.
This commit is contained in:
Lonami Exo 2024-04-02 11:02:32 +02:00
parent 9f3e7e4aa8
commit 26aa178cf6

View File

@ -96,7 +96,7 @@ class _DirectDownloadIter(RequestIter):
self._exported = True
return await self._request()
except errors.FilerefUpgradeNeededError as e:
except (errors.FilerefUpgradeNeededError, errors.FileReferenceExpiredError) as e:
# Only implemented for documents which are the ones that may take that long to download
if not self._msg_data \
or not isinstance(self.request.location, types.InputDocumentFileLocation) \