mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Begin reworking update handling
Use a fixed-size queue instead of a callback to deal with updates. Port the message box and entity cache from grammers to start off with a clean design. Temporarily get rid of other cruft such as automatic pings or old catch up implementation.
This commit is contained in:
@@ -2665,6 +2665,7 @@ class TelegramClient:
|
||||
flood_sleep_threshold: int = 60,
|
||||
# Update handling.
|
||||
receive_updates: bool = True,
|
||||
max_queued_updates: int = 100,
|
||||
):
|
||||
telegrambaseclient.init(**locals())
|
||||
|
||||
@@ -3509,10 +3510,6 @@ class TelegramClient:
|
||||
async def _clean_exported_senders(self: 'TelegramClient'):
|
||||
pass
|
||||
|
||||
@forward_call(updates._handle_update)
|
||||
def _handle_update(self: 'TelegramClient', update):
|
||||
pass
|
||||
|
||||
@forward_call(auth._update_session_state)
|
||||
async def _update_session_state(self, user, *, save=True):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user