2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Handle all given updates, avoid short circuit (#1162)

This commit is contained in:
Anton Kovalevich 2022-12-12 20:53:09 +00:00 committed by GitHub
parent 73554b9d38
commit a76269ddaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,7 +485,10 @@ class Client(Methods):
async def handle_updates(self, updates):
if isinstance(updates, (raw.types.Updates, raw.types.UpdatesCombined)):
is_min = (await self.fetch_peers(updates.users)) or (await self.fetch_peers(updates.chats))
is_min = any((
await self.fetch_peers(updates.users),
await self.fetch_peers(updates.chats),
))
users = {u.id: u for u in updates.users}
chats = {c.id: c for c in updates.chats}