mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Handle all given updates, avoid short circuit (#1162)
This commit is contained in:
parent
73554b9d38
commit
a76269ddaf
1 changed files with 4 additions and 1 deletions
|
|
@ -485,7 +485,10 @@ class Client(Methods):
|
||||||
|
|
||||||
async def handle_updates(self, updates):
|
async def handle_updates(self, updates):
|
||||||
if isinstance(updates, (raw.types.Updates, raw.types.UpdatesCombined)):
|
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}
|
users = {u.id: u for u in updates.users}
|
||||||
chats = {c.id: c for c in updates.chats}
|
chats = {c.id: c for c in updates.chats}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue