From bcbdb596a3d51f6a6f56c78848e37f0c59b669b1 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Wed, 6 Nov 2024 14:12:32 +0000 Subject: [PATCH] Fix user id --- src/state/CallViewModel.test.ts | 8 ++++---- src/utils/test.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/state/CallViewModel.test.ts b/src/state/CallViewModel.test.ts index 4ea5f8c2..e738a279 100644 --- a/src/state/CallViewModel.test.ts +++ b/src/state/CallViewModel.test.ts @@ -79,10 +79,10 @@ const daveParticipant = mockRemoteParticipant({ identity: daveId }); const members = new Map([alice, bob, carol, dave].map((p) => [p.userId, p])); -const aliceRtcMember = mockMembership(aliceId, aliceDev); -const bobRtcMember = mockMembership(bobId, bobDev); -// const carolRtcMember = mockMembership(carolId, carolDev); -const daveRtcMember = mockMembership(daveId, daveDev); +const aliceRtcMember = mockMembership(alice, aliceDev); +const bobRtcMember = mockMembership(bob, bobDev); +// const carolRtcMember = mockMembership(carol, carolDev); +const daveRtcMember = mockMembership(dave, daveDev); export interface GridLayoutSummary { type: "grid"; diff --git a/src/utils/test.ts b/src/utils/test.ts index 539623ac..b2df1562 100644 --- a/src/utils/test.ts +++ b/src/utils/test.ts @@ -98,7 +98,7 @@ function mockEmitter(): EmitterMock { } export function mockMembership( - userId: string, + user: string | RoomMember, deviceId: string, callId = "", fociPreferred: Focus[] = [], @@ -114,7 +114,7 @@ export function mockMembership( ...membership, }; const event = new MatrixEvent({ - sender: userId, + sender: typeof user === "string" ? user : user.userId, }); return new CallMembership(event, data); }