mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 04:35:24 +00:00
Fix get_send_as_chats
This commit is contained in:
parent
cf610bf2c0
commit
a7539997de
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user