review: comment and better type

This commit is contained in:
Valere
2026-01-29 14:58:54 +01:00
parent ca7c8a2f11
commit a7bd2d3668
2 changed files with 4 additions and 2 deletions

View File

@@ -16,9 +16,9 @@ import {
import { observeParticipantEvents } from "@livekit/components-core";
import {
Status as RTCSessionStatus,
type LivekitTransport,
type LivekitTransportConfig,
type MatrixRTCSession,
type Transport,
} from "matrix-js-sdk/lib/matrixrtc";
import {
BehaviorSubject,
@@ -739,7 +739,7 @@ export function enterRTCSession(
// For backwards compatibility with Element Call versions that do not do Matrix 2.0,
// we add the livekit alias to the transport.
let backwardCompatibleTransport: Transport;
let backwardCompatibleTransport: LivekitTransport | LivekitTransportConfig;
if (matrixRTCMode === MatrixRTCMode.Matrix_2_0) {
backwardCompatibleTransport = transport;
} else {

View File

@@ -43,6 +43,8 @@ export class ConnectionManagerData {
}
private getKey(transport: LivekitTransportConfig): string {
// This is enough as a key because the ConnectionManager is already scoped by room.
// The ConnectionManager should also be scoped by slotId when we have multi-slot support.
return transport.livekit_service_url;
}