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