From 25f07f6cc4eefe96c08f21d9415b914c5739b52b Mon Sep 17 00:00:00 2001 From: auric Date: Sat, 21 Feb 2026 12:53:37 -0600 Subject: ensure bot is up to date --- clients/umbrella-bot/umbrella-bot.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'clients') diff --git a/clients/umbrella-bot/umbrella-bot.py b/clients/umbrella-bot/umbrella-bot.py index 001b94c..fed3bdb 100755 --- a/clients/umbrella-bot/umbrella-bot.py +++ b/clients/umbrella-bot/umbrella-bot.py @@ -239,7 +239,8 @@ class AttachSession: "body": f"```\n{data.rstrip()}\n```", "format": "org.matrix.custom.html", "formatted_body": f"
{data.rstrip()}
", - } + }, + ignore_unverified_devices=True, ) except asyncio.CancelledError: pass @@ -458,7 +459,8 @@ async def run_bot(config: dict): # Load encryption keys if client.should_upload_keys: await client.keys_upload() - await client.keys_query() + if client.should_query_keys: + await client.keys_query() # Message callback async def on_message(room: MatrixRoom, event: RoomMessageText): @@ -488,7 +490,8 @@ async def run_bot(config: dict): "body": reply, "format": "org.matrix.custom.html", "formatted_body": reply.replace("\n", "
"), - } + }, + ignore_unverified_devices=True, ) client.add_event_callback(on_message, RoomMessageText) @@ -508,17 +511,21 @@ async def run_bot(config: dict): # Initial sync await client.sync(timeout=10000) - await client.keys_query() + if client.should_query_keys: + await client.keys_query() + + await client.joined_members(room_id) # Main sync loop async def sync_loop(): while not stop_event.is_set(): resp = await client.sync(timeout=30000, full_state=False) if isinstance(resp, SyncResponse): - # Upload any new keys if client.should_upload_keys: await client.keys_upload() - + if client.should_query_keys: + await client.keys_query() + sync_task = asyncio.create_task(sync_loop()) await stop_event.wait() -- cgit v1.2.3