1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Fix reemitter not being correctly wired on user objects created in storage classes (#3796)

* Fix issue

* Fix jest test

* Fix even more jest failures

* Fix formatting

* Add a test

* Write test for older code

* Fix lint

* Rename method

* Make ctor deprecated
This commit is contained in:
R Midhun Suresh
2023-10-27 12:30:13 +05:30
committed by GitHub
parent ce7b7bf44f
commit 88d066a10c
11 changed files with 144 additions and 22 deletions

View File

@@ -1342,6 +1342,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
this.usingExternalCrypto = opts.usingExternalCrypto ?? false;
this.store = opts.store || new StubStore();
this.store.setUserCreator((userId) => User.createUser(userId, this));
this.deviceId = opts.deviceId || null;
this.sessionId = randomString(10);