Skip to content

Commit a76269d

Browse files
authored
Handle all given updates, avoid short circuit (#1162)
1 parent 73554b9 commit a76269d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pyrogram/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,10 @@ async def fetch_peers(self, peers: List[Union[raw.types.User, raw.types.Chat, ra
485485

486486
async def handle_updates(self, updates):
487487
if isinstance(updates, (raw.types.Updates, raw.types.UpdatesCombined)):
488-
is_min = (await self.fetch_peers(updates.users)) or (await self.fetch_peers(updates.chats))
488+
is_min = any((
489+
await self.fetch_peers(updates.users),
490+
await self.fetch_peers(updates.chats),
491+
))
489492

490493
users = {u.id: u for u in updates.users}
491494
chats = {c.id: c for c in updates.chats}

0 commit comments

Comments
 (0)