mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Build events only once per update
This commit is contained in:
@@ -9,7 +9,8 @@ class UserUpdate(EventBuilder):
|
||||
"""
|
||||
Represents an user update (gone online, offline, joined Telegram).
|
||||
"""
|
||||
def build(self, update):
|
||||
@staticmethod
|
||||
def build(update):
|
||||
if isinstance(update, types.UpdateUserStatus):
|
||||
event = UserUpdate.Event(update.user_id,
|
||||
status=update.status)
|
||||
@@ -17,7 +18,7 @@ class UserUpdate(EventBuilder):
|
||||
return
|
||||
|
||||
event._entities = update._entities
|
||||
return self._filter_event(event)
|
||||
return event
|
||||
|
||||
class Event(EventCommon):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user