mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-10 03:05:58 +00:00
Fix FileData namedtuple using Python 3.7+ features
This commit is contained in:
@@ -877,7 +877,7 @@ class Client(Methods, BaseClient):
|
||||
temp_file_path = self.get_file(
|
||||
media_type=data.media_type,
|
||||
dc_id=data.dc_id,
|
||||
file_id=data.file_id,
|
||||
document_id=data.document_id,
|
||||
access_hash=data.access_hash,
|
||||
thumb_size=data.thumb_size,
|
||||
peer_id=data.peer_id,
|
||||
@@ -1520,7 +1520,7 @@ class Client(Methods, BaseClient):
|
||||
self,
|
||||
media_type: int,
|
||||
dc_id: int,
|
||||
file_id: int,
|
||||
document_id: int,
|
||||
access_hash: int,
|
||||
thumb_size: str,
|
||||
peer_id: int,
|
||||
@@ -1580,21 +1580,21 @@ class Client(Methods, BaseClient):
|
||||
)
|
||||
elif media_type in (0, 2):
|
||||
location = types.InputPhotoFileLocation(
|
||||
id=file_id,
|
||||
id=document_id,
|
||||
access_hash=access_hash,
|
||||
file_reference=b"",
|
||||
thumb_size=thumb_size
|
||||
)
|
||||
elif media_type == 14:
|
||||
location = types.InputDocumentFileLocation(
|
||||
id=file_id,
|
||||
id=document_id,
|
||||
access_hash=access_hash,
|
||||
file_reference=b"",
|
||||
thumb_size=thumb_size
|
||||
)
|
||||
else:
|
||||
location = types.InputDocumentFileLocation(
|
||||
id=file_id,
|
||||
id=document_id,
|
||||
access_hash=access_hash,
|
||||
file_reference=b"",
|
||||
thumb_size=""
|
||||
|
Reference in New Issue
Block a user