The source of the local participant is the createLocalMembership$ and

not the MatrixLivekitMembers!

Co-authored-by: Valere <bill.carson@valrsoft.com>
This commit is contained in:
Timo K
2025-11-12 12:09:31 +01:00
parent 8671d3fd67
commit 9f4d954cfa
7 changed files with 130 additions and 45 deletions

View File

@@ -30,13 +30,14 @@ const logger = rootLogger.getChild("MatrixLivekitMembers");
* or if it has no livekit transport at all.
*/
export interface MatrixLivekitMember {
participantId: string;
userId: string;
membership$: Behavior<CallMembership>;
participant$: Behavior<
LocalLivekitParticipant | RemoteLivekitParticipant | null
>;
connection$: Behavior<Connection | undefined>;
connection$: Behavior<Connection | null>;
// participantId: string; We do not want a participantId here since it will be generated by the jwt
// TODO decide if we can also drop the userId. Its in the matrix membership anyways.
userId: string;
}
interface Props {
@@ -96,7 +97,7 @@ export function createMatrixLivekitMembers$({
participants.find((p) => p.identity == participantId) ?? null;
const connection = transport
? managerData.getConnectionForTransport(transport)
: undefined;
: null;
yield {
keys: [participantId, membership.userId],