mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: types: Chat: _parse_dialog: Handle InputPeerUser and InputPeerChat
Some checks failed
Build-docs / build (push) Has been cancelled
Pyrofork / build (macos-latest, 3.10) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.11) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.12) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.13) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.9) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.10) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.11) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.12) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.13) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.9) (push) Has been cancelled
Some checks failed
Build-docs / build (push) Has been cancelled
Pyrofork / build (macos-latest, 3.10) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.11) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.12) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.13) (push) Has been cancelled
Pyrofork / build (macos-latest, 3.9) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.10) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.11) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.12) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.13) (push) Has been cancelled
Pyrofork / build (ubuntu-latest, 3.9) (push) Has been cancelled
Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
parent
9258173570
commit
59869c7404
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