Fix 'Chats' object is not iterable

This commit is contained in:
KurimuzonAkuma 2024-11-03 11:43:32 +03:00
parent 230f5d7686
commit 0fad5ad10c

View File

@ -107,15 +107,12 @@ class ResolvePeer:
) )
) )
elif peer_type == "chat": elif peer_type == "chat":
await self.fetch_peers(
await self.invoke( await self.invoke(
raw.functions.messages.GetChats( raw.functions.messages.GetChats(
id=[-peer_id] id=[-peer_id]
) )
) )
)
else: else:
await self.fetch_peers(
await self.invoke( await self.invoke(
raw.functions.channels.GetChannels( raw.functions.channels.GetChannels(
id=[ id=[
@ -126,8 +123,6 @@ class ResolvePeer:
] ]
) )
) )
)
try: try:
return await self.storage.get_peer_by_id(peer_id) return await self.storage.get_peer_by_id(peer_id)
except KeyError: except KeyError: