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

Update download_media and util methods to work with new file_id formats

This commit is contained in:
Dan
2019-08-02 02:33:52 +02:00
parent ad9f610a6a
commit 6bbd79db86
4 changed files with 19 additions and 11 deletions

View File

@@ -1063,6 +1063,7 @@ class Client(Methods, BaseClient):
access_hash=data.access_hash,
thumb_size=data.thumb_size,
peer_id=data.peer_id,
peer_access_hash=data.peer_access_hash,
volume_id=data.volume_id,
local_id=data.local_id,
file_size=data.file_size,
@@ -1702,6 +1703,7 @@ class Client(Methods, BaseClient):
access_hash: int,
thumb_size: str,
peer_id: int,
peer_access_hash: int,
volume_id: int,
local_id: int,
file_size: int,
@@ -1741,7 +1743,10 @@ class Client(Methods, BaseClient):
if media_type == 1:
location = types.InputPeerPhotoFileLocation(
peer=self.resolve_peer(peer_id),
peer=types.InputPeerUser(
user_id=peer_id,
access_hash=peer_access_hash
),
volume_id=volume_id,
local_id=local_id,
big=is_big or None