From 8acc4574586edea6be4ba845d7c99f74c2f911a2 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Thu, 10 Jul 2025 19:33:37 +0700 Subject: [PATCH] pyrofork: types: Chat: _parse_dialog: Handle InputPeerUser and InputPeerChat Signed-off-by: wulan17 --- pyrogram/types/user_and_chats/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index cd42e983..3786f212 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -476,9 +476,9 @@ class Chat(Object): users: Dict[int, "raw.types.User"], chats: Dict[int, "raw.types.Chat"] ) -> "Chat": - if isinstance(peer, raw.types.PeerUser): + if isinstance(peer, raw.types.PeerUser) or isinstance(peer, raw.types.InputPeerUser): return Chat._parse_user_chat(client, users[peer.user_id]) - elif isinstance(peer, raw.types.PeerChat): + elif isinstance(peer, raw.types.PeerChat) or isinstance(peer, raw.types.InputPeerChat): return Chat._parse_chat_chat(client, chats[peer.chat_id]) else: return Chat._parse_channel_chat(client, chats[peer.channel_id])