mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-03 11:40:11 +03:00
Add missing await
This commit is contained in:
parent
c0fa2ae620
commit
d20dc01afa
|
@ -2426,12 +2426,12 @@ class TelegramClient(TelegramBareClient):
|
|||
def list_update_handlers(self):
|
||||
return [callback for callback, _ in self.list_event_handlers()]
|
||||
|
||||
def catch_up(self):
|
||||
async def catch_up(self):
|
||||
state = self.session.get_update_state(0)
|
||||
self.session.catching_up = True
|
||||
try:
|
||||
while True:
|
||||
d = self(GetDifferenceRequest(state.pts, state.date, state.qts))
|
||||
d = await self(GetDifferenceRequest(state.pts, state.date, state.qts))
|
||||
if isinstance(d, DifferenceEmpty):
|
||||
state.date = d.date
|
||||
state.seq = d.seq
|
||||
|
|
Loading…
Reference in New Issue
Block a user