diff --git a/pyrogram/methods/chats/get_send_as_chats.py b/pyrogram/methods/chats/get_send_as_chats.py index 0fecbbb55..160ffaf23 100644 --- a/pyrogram/methods/chats/get_send_as_chats.py +++ b/pyrogram/methods/chats/get_send_as_chats.py @@ -55,9 +55,9 @@ async def get_send_as_chats( send_as_chats = types.List() for p in r.peers: - if isinstance(p, raw.types.PeerUser): - send_as_chats.append(types.Chat._parse_chat(self, users[p.user_id])) + if isinstance(p.peer, raw.types.PeerUser): + send_as_chats.append(types.Chat._parse_chat(self, users[p.peer.user_id])) else: - send_as_chats.append(types.Chat._parse_chat(self, chats[p.channel_id])) + send_as_chats.append(types.Chat._parse_chat(self, chats[p.peer.channel_id])) return send_as_chats