Fix broken Chat parsing for user/bot chats
This commit is contained in:
parent
e850530a9b
commit
6027ee867f
@ -225,14 +225,7 @@ class Chat(Object):
|
||||
@staticmethod
|
||||
def _parse(client, message: raw.types.Message or raw.types.MessageService, users: dict, chats: dict) -> "Chat":
|
||||
if isinstance(message.peer_id, raw.types.PeerUser):
|
||||
return Chat._parse_user_chat(
|
||||
client,
|
||||
users[
|
||||
message.peer_id.user_id
|
||||
if message.out
|
||||
else utils.get_raw_peer_id(message.from_id)
|
||||
]
|
||||
)
|
||||
return Chat._parse_user_chat(client, users[message.peer_id.user_id])
|
||||
|
||||
if isinstance(message.peer_id, raw.types.PeerChat):
|
||||
return Chat._parse_chat_chat(client, chats[message.peer_id.chat_id])
|
||||
|
Loading…
Reference in New Issue
Block a user