mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-23 18:37:26 +00:00
Fix IndexError when parsing empty nearby chats
This commit is contained in:
parent
95051d7fb1
commit
55f5a1a36c
@ -57,6 +57,9 @@ class GetNearbyChats(BaseClient):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not r.updates:
|
||||||
|
return []
|
||||||
|
|
||||||
chats = pyrogram.List([pyrogram.Chat._parse_chat(self, chat) for chat in r.chats])
|
chats = pyrogram.List([pyrogram.Chat._parse_chat(self, chat) for chat in r.chats])
|
||||||
peers = r.updates[0].peers
|
peers = r.updates[0].peers
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user