1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-31 13:44:28 +03:00

Adapt Membership usage for the change to an enum KnownMembership

This commit is contained in:
Andy Balaam
2024-03-12 14:52:54 +00:00
parent da99bad7b9
commit 34559d2a89
115 changed files with 764 additions and 593 deletions

View File

@ -15,7 +15,7 @@ limitations under the License.
*/
import { mocked } from "jest-mock";
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
import { KnownMembership, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
import { LocalRoom, LocalRoomState, LOCAL_ROOM_ID_PREFIX } from "../../src/models/LocalRoom";
import * as localRoomModule from "../../src/utils/local-room";
@ -36,7 +36,7 @@ describe("local-room", () => {
beforeEach(() => {
client = createTestClient();
room1 = new Room("!room1:example.com", client, userId1);
room1.getMyMembership = () => Membership.Join;
room1.getMyMembership = () => KnownMembership.Join;
localRoom = new LocalRoom(LOCAL_ROOM_ID_PREFIX + "test", client, "@test:example.com");
mocked(client.getRoom).mockImplementation((roomId: string) => {
if (roomId === localRoom.roomId) {