Refetch msg if fileref expires while downloading docs

Closes #1301.
This commit is contained in:
Lonami Exo
2020-09-24 10:03:28 +02:00
parent 75fbd28d3e
commit c864ef7e16
2 changed files with 89 additions and 8 deletions

View File

@@ -761,6 +761,8 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
with the ``message`` already set.
"""
if self._client:
# Passing the entire message is important, in case it has to be
# refetched for a fresh file reference.
return await self._client.download_media(self, *args, **kwargs)
async def click(self, i=None, j=None,