fix playwright test! (It caught an actual bug!!! so the right wording

would be: fix implementation thanks to the playwright test!
This commit is contained in:
Timo K
2025-12-01 17:29:21 +01:00
parent f26aa8f970
commit 63cd4f79dd
3 changed files with 21 additions and 10 deletions

View File

@@ -234,19 +234,26 @@ export const createLocalMembership$ = ({
// */
const connected$ = scope.behavior(
and$(
homeserverConnected$,
homeserverConnected$.pipe(
tap((v) => logger.info("matrix: Connected state changed", v)),
),
localConnectionState$.pipe(
switchMap((state) => {
logger.info("livekit: Connected state changed", state);
if (!state) return of(false);
if (state.state === "ConnectedToLkRoom") {
state.livekitConnectionState$.pipe(
logger.info(
"livekit: Connected state changed (inner livekitConnectionState$)",
state.livekitConnectionState$.value,
);
return state.livekitConnectionState$.pipe(
map((lkState) => lkState === ConnectionState.Connected),
);
}
return of(false);
}),
),
),
).pipe(tap((v) => logger.info("combined: Connected state changed", v))),
);
// MATRIX RELATED