diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index 5576e6ad..3afbb47e 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -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])