mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-12-02 18:55:13 +00:00
Fix 'Chats' object is not iterable
This commit is contained in:
parent
230f5d7686
commit
0fad5ad10c
@ -107,27 +107,22 @@ class ResolvePeer:
|
||||
)
|
||||
)
|
||||
elif peer_type == "chat":
|
||||
await self.fetch_peers(
|
||||
await self.invoke(
|
||||
raw.functions.messages.GetChats(
|
||||
id=[-peer_id]
|
||||
)
|
||||
await self.invoke(
|
||||
raw.functions.messages.GetChats(
|
||||
id=[-peer_id]
|
||||
)
|
||||
)
|
||||
else:
|
||||
await self.fetch_peers(
|
||||
await self.invoke(
|
||||
raw.functions.channels.GetChannels(
|
||||
id=[
|
||||
raw.types.InputChannel(
|
||||
channel_id=utils.get_channel_id(peer_id),
|
||||
access_hash=0
|
||||
)
|
||||
]
|
||||
)
|
||||
await self.invoke(
|
||||
raw.functions.channels.GetChannels(
|
||||
id=[
|
||||
raw.types.InputChannel(
|
||||
channel_id=utils.get_channel_id(peer_id),
|
||||
access_hash=0
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
try:
|
||||
return await self.storage.get_peer_by_id(peer_id)
|
||||
except KeyError:
|
||||
|
Loading…
Reference in New Issue
Block a user