From ea4de29975109b6b5bbedd2e7cd5e6d3a2a89d03 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 12 Aug 2021 13:04:41 -0700 Subject: [PATCH] Properly encode session store --- src/matrix/storage/idb/stores/SessionStore.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/matrix/storage/idb/stores/SessionStore.ts b/src/matrix/storage/idb/stores/SessionStore.ts index dd578d8c..b1891b72 100644 --- a/src/matrix/storage/idb/stores/SessionStore.ts +++ b/src/matrix/storage/idb/stores/SessionStore.ts @@ -15,10 +15,15 @@ limitations under the License. */ import {Store} from "../Store" -export class SessionStore { - private _sessionStore: Store +export interface SessionEntry { + key: string + value: any +} - constructor(sessionStore: Store) { +export class SessionStore { + private _sessionStore: Store + + constructor(sessionStore: Store) { this._sessionStore = sessionStore; } @@ -29,11 +34,11 @@ export class SessionStore { } } - set(key: IDBValidKey, value: any) { + set(key: string, value: any) { this._sessionStore.put({key, value}); } - add(key: IDBValidKey, value: any) { + add(key: string, value: any) { this._sessionStore.add({key, value}); }