mirror of
https://github.com/vector-im/element-call.git
synced 2026-10-16 23:45:50 +00:00
Match LiveKit participants against all backend identities
A member authenticated through the legacy JWT endpoint publishes under a `user:device` identity, while one authenticated through the default endpoint publishes under a hashed identity. Both are listed in the membership's backend identities, so match against the whole list rather than only the primary one.
This commit is contained in:
@@ -111,8 +111,8 @@ export function createRemoteMatrixLivekitMembers$({
|
||||
const participants = transport
|
||||
? managerData.getParticipantsForTransport(transport)
|
||||
: [];
|
||||
const matches = participants.filter(
|
||||
(p) => p.identity == membership.rtcBackendIdentity,
|
||||
const matches = participants.filter((p) =>
|
||||
membership.backendIdentities.includes(p.identity),
|
||||
);
|
||||
const participant = matches[0] ?? null;
|
||||
const connection = transport
|
||||
|
||||
+4
-3
@@ -261,11 +261,12 @@ export function mockRtcMembership(
|
||||
content: data,
|
||||
});
|
||||
|
||||
const membershipData = CallMembership.membershipDataFromMatrixEvent(event);
|
||||
const backendIdentity = rtcBackendIdentity ?? `${userId}:${deviceId}`;
|
||||
const cms = new CallMembership(
|
||||
event,
|
||||
membershipData,
|
||||
rtcBackendIdentity ?? `${userId}:${deviceId}`,
|
||||
CallMembership.membershipDataFromMatrixEvent(event),
|
||||
[backendIdentity],
|
||||
backendIdentity,
|
||||
);
|
||||
vi.mocked(cms).getTransport = vi.fn().mockReturnValue(fociPreferred[0]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user