diff --git a/doc/TODO.md b/doc/TODO.md index f7ba9b4e..3b0eace1 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -1,5 +1,10 @@ # Minimal thing to get working - - given an access token, a working sync loop that echoes all the messages - - allow sync to resume from storage - - \ No newline at end of file + - finish summary store + - add eventemitter + - make sync work + - store summaries + - setup editorconfig + - setup linting (also in editor) + - store timeline + - store state \ No newline at end of file diff --git a/src/session.js b/src/session.js index 515281d8..f12b25a9 100644 --- a/src/session.js +++ b/src/session.js @@ -1,11 +1,11 @@ export default class Session { - // loginData has device_id, user_id, home_server, access_token constructor(storage) { this._storage = storage; this._session = null; this._rooms = null; } // should be called before load + // loginData has device_id, user_id, home_server, access_token async setLoginData(loginData) { const txn = this._storage.readWriteTxn([this._storage.storeNames.session]); const session = {loginData}; @@ -43,7 +43,7 @@ export default class Session { applySync(syncToken, accountData, txn) { this._session.syncToken = syncToken; - txn.session.setSession(this._session); + txn.session.set(this._session); } get syncToken() {