Fix autojoin and online flags not being applied if set during client creation (#258)

This commit is contained in:
Binesh Bannerjee 2025-01-22 13:10:39 -05:00 committed by GitHub
parent c3458eab58
commit 094e1eca35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()