From 1f6bf12a2944e51e40145dcadb4614bd08ba15cf Mon Sep 17 00:00:00 2001 From: R Midhun Suresh Date: Thu, 9 Nov 2023 18:32:59 +0530 Subject: [PATCH] Use method from MatrixClient to set new store This will take care of wiring up the userCreator correctly --- src/MatrixClientPeg.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index fbc54b38967..f4c69538049 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -238,9 +238,10 @@ class MatrixClientPegClass implements IMatrixClientPeg { } catch (err) { if (dbType === "indexeddb") { logger.error("Error starting matrixclient store - falling back to memory store", err); - this.matrixClient.store = new MemoryStore({ + const fallbackStore = new MemoryStore({ localStorage: localStorage, }); + this.matrixClient.setStore(fallbackStore); } else { logger.error("Failed to start memory store!", err); throw err;