accounts.json: support new "enabled" key
Specifying false will cause Mirage to ignore an account and not log it in on startup. Defaults to true when adding new accounts or if not present.
This commit is contained in:
parent
80ac8896d8
commit
b2cfc27ce2
|
@ -153,6 +153,7 @@ class Backend:
|
|||
return await asyncio.gather(*(
|
||||
resume(uid, info)
|
||||
for uid, info in (await self.saved_accounts.read()).items()
|
||||
if info.get("enabled", True)
|
||||
))
|
||||
|
||||
|
||||
|
|
|
@ -190,6 +190,7 @@ class Accounts(JSONDataFile):
|
|||
"homeserver": client.homeserver,
|
||||
"token": client.access_token,
|
||||
"device_id": client.device_id,
|
||||
"enabled": True,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user