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.

Element Call's test membership mock, matching the SDK's RTCMember.
This commit is contained in:
Robin
2026-10-14 10:23:29 +02:00
committed by Timo
parent f638604fe7
commit 1700e9fe20
+2 -1
View File
@@ -224,7 +224,7 @@ export function mockRtcMembership(
deviceId: string, deviceId: string,
customOverwrites?: { customOverwrites?: {
rtcBackendIdentity?: string; rtcBackendIdentity?: string;
/** Every identity the member may have in LiveKit, when more than one. */ /** Every identity the member may have on its transport, where more than one. */
backendIdentities?: string[]; backendIdentities?: string[];
callId?: string; callId?: string;
fociPreferred?: Transport[]; fociPreferred?: Transport[];
@@ -471,6 +471,7 @@ export function mockRTCMember(
}; };
const base = { const base = {
rtcBackendIdentity: membership.rtcBackendIdentity, rtcBackendIdentity: membership.rtcBackendIdentity,
backendIdentities: membership.backendIdentities,
userId: membership.userId, userId: membership.userId,
deviceId: membership.deviceId, deviceId: membership.deviceId,
memberId: membership.memberId, memberId: membership.memberId,