mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
fix: Fix AttributeError when calling get_send_as_chats()
This commit is contained in:
parent
dee698fc45
commit
18289f96b5
1 changed files with 3 additions and 3 deletions
|
|
@ -59,9 +59,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 a new issue