1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-24 06:02:08 +03:00

Use doMaybeLocalRoomAction (#9038)

* Use doMaybeLocalRoomAction

* Revert unnecessary changes
This commit is contained in:
Michael Weimann
2022-07-13 07:56:36 +02:00
committed by GitHub
parent 9b8b8763f7
commit 3be20cf434
12 changed files with 333 additions and 22 deletions

View File

@ -28,8 +28,8 @@ describe("MatrixClientPeg", () => {
it("setJustRegisteredUserId", () => {
stubClient();
(peg as any).matrixClient = peg.get();
peg.setJustRegisteredUserId("@userId:matrix.rog");
expect(peg.get().credentials.userId).toBe("@userId:matrix.rog");
peg.setJustRegisteredUserId("@userId:matrix.org");
expect(peg.get().credentials.userId).toBe("@userId:matrix.org");
expect(peg.currentUserIsJustRegistered()).toBe(true);
expect(peg.userRegisteredWithinLastHours(0)).toBe(false);
expect(peg.userRegisteredWithinLastHours(1)).toBe(true);