mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Call catch_up before processing updates if the user wants so
This commit is contained in:
@@ -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():
|
||||||
|
Reference in New Issue
Block a user