[MatrixRTC] Do not sent the livekit_alias in sticky events (#5165)

* Do not sent the livekit_alias in sticky events

* tests
This commit is contained in:
Timo
2026-01-27 16:23:14 +01:00
committed by GitHub
parent f136f6ddf7
commit bc57a3f829
2 changed files with 8 additions and 2 deletions
@@ -970,7 +970,7 @@ describe("MembershipManager", () => {
device_id: "AAAAAAA",
},
slot_id: "m.call#",
rtc_transports: [focus],
rtc_transports: [{ type: focus.type, livekit_service_url: focus.livekit_service_url }],
versions: [],
msc4354_sticky_key: "@alice:example.org:AAAAAAA_m.call",
},
+7 -1
View File
@@ -43,6 +43,7 @@ import {
type IMembershipManager,
type MembershipManagerEventHandlerMap,
} from "./IMembershipManager.ts";
import { isLivekitTransportConfig } from "./LivekitTransport.ts";
/* MembershipActionTypes:
On Join: ───────────────┐ ┌───────────────(1)───────────┐
@@ -1092,6 +1093,7 @@ export class StickyEventMembershipManager extends MembershipManager {
protected makeMyMembership(expires: number): SessionMembershipData | RtcMembershipData {
const ownMembership = this.ownMembership;
const livekitTransport = isLivekitTransportConfig(this.rtcTransport) ? this.rtcTransport : undefined;
const relationObject = ownMembership?.eventId
? { "m.relation": { rel_type: RelationType.Reference, event_id: ownMembership?.eventId } }
: {};
@@ -1101,7 +1103,11 @@ export class StickyEventMembershipManager extends MembershipManager {
...(this.callIntent ? { "m.call.intent": this.callIntent } : {}),
},
slot_id: slotDescriptionToId(this.slotDescription),
rtc_transports: this.rtcTransport ? [this.rtcTransport] : [],
// Make sure we do not add the alias to the transport.
// It is not needed in matrix2.0. The additional session information will be used to find the right alias on the sfu.
rtc_transports: livekitTransport
? [{ type: livekitTransport.type, livekit_service_url: livekitTransport.livekit_service_url }]
: [],
member: { device_id: this.deviceId, user_id: this.userId, id: this.memberId },
versions: [],
...relationObject,