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 wulan17
parent e0b7576418
commit b038890745
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

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}