Call catch_up before processing updates if the user wants so

This commit is contained in:
Lonami Exo 2022-05-25 15:31:39 +02:00
parent aa7a083444
commit 378ccd17bf

View File

@ -247,6 +247,11 @@ class UpdateMethods:
async def _update_loop(self: 'TelegramClient'):
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()
while self.is_connected():