mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 03:54:51 +00:00
pyrofork: types: Chat: _parse_dialog: Handle InputPeerUser and InputPeerChat
Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
parent
413556a3f2
commit
8acc457458
1 changed files with 2 additions and 2 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Reference in a new issue