mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Simplify event resolving logic
Although this commit introduces a race condition since an event may only be half-resolved. A lock is thus needed, but it depends on an event-loop to which we don't have access in the class-level.
This commit is contained in:
@@ -71,8 +71,9 @@ class NewMessage(EventBuilder):
|
||||
))
|
||||
|
||||
async def resolve(self, client):
|
||||
await super().resolve(client)
|
||||
self.from_users = await _into_id_set(client, self.from_users)
|
||||
if not self.resolved:
|
||||
await super().resolve(client)
|
||||
self.from_users = await _into_id_set(client, self.from_users)
|
||||
|
||||
@classmethod
|
||||
def build(cls, update):
|
||||
|
Reference in New Issue
Block a user