From 521e403f9220f53c8e19500c36fb4b4a3bafe577 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 7 Dec 2020 19:15:46 +0100 Subject: [PATCH] Fix peer ids decoding from file ids --- pyrogram/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/client.py b/pyrogram/client.py index df06e94c..6638b3b4 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -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 )