mirror of
https://github.com/vector-im/element-call.git
synced 2026-01-30 03:15:55 +00:00
Wait for .well-known/matrix/client to load before determining MatrixRTC foci (#2901)
This commit is contained in:
@@ -40,7 +40,7 @@ test("It joins the correct Session", async () => {
|
||||
room: {
|
||||
roomId: "roomId",
|
||||
client: {
|
||||
getClientWellKnown: vi.fn().mockReturnValue(clientWellKnown),
|
||||
waitForClientWellKnown: vi.fn().mockResolvedValue(clientWellKnown),
|
||||
},
|
||||
},
|
||||
memberships: [],
|
||||
|
||||
@@ -44,8 +44,9 @@ async function makePreferredLivekitFoci(
|
||||
}
|
||||
|
||||
// Prioritize the client well known over the configured sfu.
|
||||
const wellKnownFoci =
|
||||
rtcSession.room.client.getClientWellKnown()?.[FOCI_WK_KEY];
|
||||
const wellKnownFoci = (
|
||||
await rtcSession.room.client.waitForClientWellKnown()
|
||||
)?.[FOCI_WK_KEY];
|
||||
if (Array.isArray(wellKnownFoci)) {
|
||||
preferredFoci.push(
|
||||
...wellKnownFoci
|
||||
|
||||
Reference in New Issue
Block a user