diff --git a/pyrogram/client/methods/chats/get_nearby_chats.py b/pyrogram/client/methods/chats/get_nearby_chats.py index 7f9e3614..dc0910e8 100644 --- a/pyrogram/client/methods/chats/get_nearby_chats.py +++ b/pyrogram/client/methods/chats/get_nearby_chats.py @@ -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