From 51bde671493d0fa4644603714d9890915787cec0 Mon Sep 17 00:00:00 2001 From: hibobmaster Date: Fri, 14 Apr 2023 18:34:31 +0800 Subject: [PATCH] remove unused --- bot.py | 18 ------------------ main.py | 3 --- 2 files changed, 21 deletions(-) diff --git a/bot.py b/bot.py index d910957..825c834 100644 --- a/bot.py +++ b/bot.py @@ -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) diff --git a/main.py b/main.py index 4b3a73e..113322b 100644 --- a/main.py +++ b/main.py @@ -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)