mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-11 08:32:22 +03:00
Call catch_up before processing updates if the user wants so
This commit is contained in:
parent
aa7a083444
commit
378ccd17bf
|
@ -247,6 +247,11 @@ class UpdateMethods:
|
||||||
|
|
||||||
async def _update_loop(self: 'TelegramClient'):
|
async def _update_loop(self: 'TelegramClient'):
|
||||||
try:
|
try:
|
||||||
|
if self._catch_up:
|
||||||
|
# User wants to catch up as soon as the client is up and running,
|
||||||
|
# so this is the best place to do it.
|
||||||
|
await self.catch_up()
|
||||||
|
|
||||||
updates_to_dispatch = deque()
|
updates_to_dispatch = deque()
|
||||||
|
|
||||||
while self.is_connected():
|
while self.is_connected():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user