2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-07 17:55:24 +00:00

Fix IndexError when parsing empty nearby chats

This commit is contained in:
Dan
2019-08-17 22:30:34 +02:00
parent 95051d7fb1
commit 55f5a1a36c

View File

@@ -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])
peers = r.updates[0].peers