From df091a7d3e44fc1a7b17e1b9d754a04fa110257b Mon Sep 17 00:00:00 2001 From: Valere Fedronic Date: Tue, 6 Jan 2026 15:13:48 +0100 Subject: [PATCH] rtc: use new API in tests (instead of deprecated calls) (#31649) --- test/unit-tests/Notifier-test.ts | 14 +++++++++----- test/unit-tests/models/Call-test.ts | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/unit-tests/Notifier-test.ts b/test/unit-tests/Notifier-test.ts index 008606fedd..697ef8bd72 100644 --- a/test/unit-tests/Notifier-test.ts +++ b/test/unit-tests/Notifier-test.ts @@ -443,12 +443,16 @@ describe("Notifier", () => { content: {}, }), { - call_id: "123", - application: "m.call", - focus_active: { type: "livekit" }, - foci_preferred: [], - device_id: "DEVICE", + kind: "session", + data: { + call_id: "123", + application: "m.call", + focus_active: { type: "livekit", focus_selection: "oldest_membership" }, + foci_preferred: [], + device_id: "DEVICE", + }, }, + "hashed_id_XXXAAAAA", ), ]; diff --git a/test/unit-tests/models/Call-test.ts b/test/unit-tests/models/Call-test.ts index e26ae85fa4..f05a832ff3 100644 --- a/test/unit-tests/models/Call-test.ts +++ b/test/unit-tests/models/Call-test.ts @@ -1051,7 +1051,7 @@ describe("ElementCall", () => { setRoomMembers(["@user:example.com", "@user2:example.com", "@user4:example.com"]); }); it("don't sent notify event if there are existing room call members", async () => { - jest.spyOn(MatrixRTCSession, "callMembershipsForRoom").mockReturnValue([ + jest.spyOn(MatrixRTCSession, "sessionMembershipsForSlot").mockResolvedValue([ { application: "m.call", callId: "" } as unknown as CallMembership, ]); const sendEventSpy = jest.spyOn(room.client, "sendEvent");