From ed269e0711e3e96f12e10bb900dbe24cd6833df8 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:12:12 +0100 Subject: [PATCH] Revert "Wait for .well-known/matrix/client to load before determining MatrixRTC foci" (#2902) This reverts commit 92afd5d63ae2914f651a3eef93554b3cbf4abb40. --- src/rtcSessionHelper.test.ts | 2 +- src/rtcSessionHelpers.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rtcSessionHelper.test.ts b/src/rtcSessionHelper.test.ts index 729545f7..7df9f1b3 100644 --- a/src/rtcSessionHelper.test.ts +++ b/src/rtcSessionHelper.test.ts @@ -40,7 +40,7 @@ test("It joins the correct Session", async () => { room: { roomId: "roomId", client: { - waitForClientWellKnown: vi.fn().mockResolvedValue(clientWellKnown), + getClientWellKnown: vi.fn().mockReturnValue(clientWellKnown), }, }, memberships: [], diff --git a/src/rtcSessionHelpers.ts b/src/rtcSessionHelpers.ts index 680df571..f1c7eb8c 100644 --- a/src/rtcSessionHelpers.ts +++ b/src/rtcSessionHelpers.ts @@ -44,9 +44,8 @@ async function makePreferredLivekitFoci( } // Prioritize the client well known over the configured sfu. - const wellKnownFoci = ( - await rtcSession.room.client.waitForClientWellKnown() - )?.[FOCI_WK_KEY]; + const wellKnownFoci = + rtcSession.room.client.getClientWellKnown()?.[FOCI_WK_KEY]; if (Array.isArray(wellKnownFoci)) { preferredFoci.push( ...wellKnownFoci