2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-08 02:05:51 +00:00

Fix FILE_REFERENCE_* errors for downloads

This commit is contained in:
Dan
2019-09-21 21:12:11 +02:00
parent 7df4b58a51
commit 1cd94520bf
11 changed files with 62 additions and 5 deletions

View File

@@ -1224,6 +1224,7 @@ class Client(Methods, BaseClient):
peer_access_hash=data.peer_access_hash,
volume_id=data.volume_id,
local_id=data.local_id,
file_ref=data.file_ref,
file_size=data.file_size,
is_big=data.is_big,
progress=progress,
@@ -1868,6 +1869,7 @@ class Client(Methods, BaseClient):
peer_access_hash: int,
volume_id: int,
local_id: int,
file_ref: bytes,
file_size: int,
is_big: bool,
progress: callable,
@@ -1922,21 +1924,21 @@ class Client(Methods, BaseClient):
location = types.InputPhotoFileLocation(
id=document_id,
access_hash=access_hash,
file_reference=b"",
file_reference=file_ref,
thumb_size=thumb_size
)
elif media_type == 14:
location = types.InputDocumentFileLocation(
id=document_id,
access_hash=access_hash,
file_reference=b"",
file_reference=file_ref,
thumb_size=thumb_size
)
else:
location = types.InputDocumentFileLocation(
id=document_id,
access_hash=access_hash,
file_reference=b"",
file_reference=file_ref,
thumb_size=""
)