From 094e1eca35fd7d859bdf03db0555925986265996 Mon Sep 17 00:00:00 2001 From: Binesh Bannerjee Date: Wed, 22 Jan 2025 13:10:39 -0500 Subject: [PATCH] Fix autojoin and online flags not being applied if set during client creation (#258) --- maubot/management/api/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maubot/management/api/client.py b/maubot/management/api/client.py index 2a8964c..d2ad35d 100644 --- a/maubot/management/api/client.py +++ b/maubot/management/api/client.py @@ -78,8 +78,8 @@ async def _create_client(user_id: UserID | None, data: dict) -> web.Response: ) client.enabled = data.get("enabled", True) client.sync = data.get("sync", True) - client.autojoin = data.get("autojoin", True) - client.online = data.get("online", True) + await client.update_autojoin(data.get("autojoin", True), save=False) + await client.update_online(data.get("online", True), save=False) client.displayname = data.get("displayname", "disable") client.avatar_url = data.get("avatar_url", "disable") await client.update()