mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
simplify session store api
This commit is contained in:
parent
7a15f12525
commit
3e763ab5c0
@ -1,13 +1,33 @@
|
||||
/**
|
||||
store contains:
|
||||
loginData {
|
||||
device_id
|
||||
home_server
|
||||
access_token
|
||||
user_id
|
||||
}
|
||||
// flags {
|
||||
// lazyLoading?
|
||||
// }
|
||||
syncToken
|
||||
displayName
|
||||
avatarUrl
|
||||
lastSynced
|
||||
*/
|
||||
class SessionStore {
|
||||
|
||||
constructor(session, db) {
|
||||
this._db = new Database(db);
|
||||
constructor(sessionStore) {
|
||||
this._sessionStore = sessionStore;
|
||||
}
|
||||
|
||||
get session() {
|
||||
readSession() {
|
||||
return this._session;
|
||||
}
|
||||
|
||||
writeSession(session) {
|
||||
|
||||
}
|
||||
|
||||
// or dedicated set sync_token method?
|
||||
async setAvatar(avatar) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user