mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-10 11:15:27 +00:00
@@ -1221,6 +1221,7 @@ class Client(Methods, BaseClient):
|
||||
access_hash=data.access_hash,
|
||||
thumb_size=data.thumb_size,
|
||||
peer_id=data.peer_id,
|
||||
peer_type=data.peer_type,
|
||||
peer_access_hash=data.peer_access_hash,
|
||||
volume_id=data.volume_id,
|
||||
local_id=data.local_id,
|
||||
@@ -1866,6 +1867,7 @@ class Client(Methods, BaseClient):
|
||||
access_hash: int,
|
||||
thumb_size: str,
|
||||
peer_id: int,
|
||||
peer_type: str,
|
||||
peer_access_hash: int,
|
||||
volume_id: int,
|
||||
local_id: int,
|
||||
@@ -1913,11 +1915,23 @@ class Client(Methods, BaseClient):
|
||||
file_ref = utils.decode_file_ref(file_ref)
|
||||
|
||||
if media_type == 1:
|
||||
location = types.InputPeerPhotoFileLocation(
|
||||
peer=types.InputPeerUser(
|
||||
if peer_type == "user":
|
||||
peer = types.InputPeerUser(
|
||||
user_id=peer_id,
|
||||
access_hash=peer_access_hash
|
||||
),
|
||||
)
|
||||
elif peer_type == "chat":
|
||||
peer = types.InputPeerChat(
|
||||
chat_id=peer_id
|
||||
)
|
||||
else:
|
||||
peer = types.InputPeerChannel(
|
||||
channel_id=peer_id,
|
||||
access_hash=peer_access_hash
|
||||
)
|
||||
|
||||
location = types.InputPeerPhotoFileLocation(
|
||||
peer=peer,
|
||||
volume_id=volume_id,
|
||||
local_id=local_id,
|
||||
big=is_big or None
|
||||
|
Reference in New Issue
Block a user