Fix get_send_as_chats

This commit is contained in:
KurimuzonAkuma 2023-10-19 13:07:44 +03:00
parent cf610bf2c0
commit a7539997de

View File

@ -57,9 +57,9 @@ class GetSendAsChats:
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