Fix peer ids decoding from file ids

This commit is contained in:
Dan 2020-12-07 19:15:46 +01:00
parent 3c8f41b1d2
commit 521e403f92

View File

@ -866,11 +866,11 @@ class Client(Methods, Scaffold):
else:
if file_id.chat_access_hash == 0:
peer = raw.types.InputPeerChat(
chat_id=file_id.chat_id
chat_id=-file_id.chat_id
)
else:
peer = raw.types.InputPeerChannel(
channel_id=file_id.chat_id,
channel_id=utils.get_channel_id(file_id.chat_id),
access_hash=file_id.chat_access_hash
)