Fix upload_keys
This commit is contained in:
parent
da1e1df6df
commit
6f1f9c598d
|
@ -129,7 +129,6 @@ class Bot(object):
|
|||
return self.__client
|
||||
|
||||
async def __upload_keys(self) -> None:
|
||||
if self.client.should_upload_keys:
|
||||
await self.client.keys_upload()
|
||||
|
||||
if self.client.should_query_keys:
|
||||
|
@ -141,9 +140,12 @@ class Bot(object):
|
|||
|
||||
async def sync(self) -> None:
|
||||
self.logger.debug('Starting sync')
|
||||
next_batch = self.__read_next_batch()
|
||||
await self.__upload_keys()
|
||||
|
||||
await self.client.sync(timeout=30000, full_state=True)
|
||||
await self.client.sync(timeout=30000,
|
||||
full_state=True,
|
||||
since=next_batch)
|
||||
|
||||
async def sync_forever(self) -> None:
|
||||
# next_batch = self.__read_next_batch()
|
||||
|
@ -159,7 +161,7 @@ class Bot(object):
|
|||
self.logger.debug('Adding callbacks')
|
||||
client.add_to_device_callback(self.__to_device_callback,
|
||||
(KeyVerificationEvent, ))
|
||||
self.__upload_keys()
|
||||
await self.__upload_keys()
|
||||
click.secho('\nStarting verification process...',
|
||||
bold=True,
|
||||
fg='green')
|
||||
|
|
Loading…
Reference in New Issue