remove unused

This commit is contained in:
hibobmaster 2023-04-14 18:34:31 +08:00
parent e086568821
commit 51bde67149
No known key found for this signature in database
GPG Key ID: 316B77D7914D713C
2 changed files with 0 additions and 21 deletions

18
bot.py
View File

@ -653,21 +653,3 @@ class Bot:
async def sync_forever(self, timeout=30000, full_state=True) -> None:
await self.client.sync_forever(timeout=timeout, full_state=full_state)
# Sync encryption keys with the server
async def sync_encryption_key(self) -> None:
if self.client.should_upload_keys:
await self.client.keys_upload()
# Trust own devices
async def trust_own_devices(self) -> None:
await self.client.sync(timeout=30000, full_state=True)
for device_id, olm_device in self.client.device_store[
self.user_id].items():
logger.debug("My other devices are: "
f"device_id={device_id}, "
f"olm_device={olm_device}.")
logger.info("Setting up trust for my own "
f"device {device_id} and session key "
f"{olm_device.keys['ed25519']}.")
self.client.verify_device(olm_device)

View File

@ -46,9 +46,6 @@ async def main():
)
await matrix_bot.login()
await matrix_bot.sync_encryption_key()
# await matrix_bot.trust_own_devices()
await matrix_bot.sync_forever(timeout=30000, full_state=True)