Fix accounts.json update with missing enabled key
This commit is contained in:
parent
3c620f6fd1
commit
f05f2357c7
2
TODO.md
2
TODO.md
|
@ -1,11 +1,11 @@
|
|||
# TODO
|
||||
|
||||
- save and restore status in accounts.json
|
||||
- mark accounts as offline when closing mirage
|
||||
- document new x11 dependnecy (auto-idle)
|
||||
- auto-idle for Windows and OSX
|
||||
- open context menus centered on touch screens
|
||||
- retrieve last seen time for offline members on hover/in profile
|
||||
- auto-away after a configurable idle time
|
||||
- status based on process detection
|
||||
- retry if media not found
|
||||
- fix members not synced bug
|
||||
|
|
|
@ -210,9 +210,14 @@ class Accounts(JSONDataFile):
|
|||
|
||||
saved = await self.read()
|
||||
|
||||
saved[user_id]["enabled"] = enabled or saved[user_id]["enabled"]
|
||||
saved[user_id]["presence"] = presence or saved[user_id]["presence"]
|
||||
saved[user_id]["order"] = order or saved[user_id]["order"]
|
||||
if enabled is not None:
|
||||
saved[user_id]["enabled"] = enabled
|
||||
|
||||
if presence is not None:
|
||||
saved[user_id]["presence"] = presence
|
||||
|
||||
if order is not None:
|
||||
saved[user_id]["order"] = order
|
||||
|
||||
await self.write({**saved})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user