mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
Add enableClientWellKnownLookups
Gate client well-known lookups on enableClientWellKnownLookups New URL param (default on), threaded from the embedder. When off, always avoid client .well-known: skip the post-login poll (widget + SPA) and the legacy MatrixRTC foci fallback. When on/unset, respect the transports endpoint response: only fall back to .well-known on a 404 M_UNRECOGNIZED.
This commit is contained in:
@@ -82,6 +82,7 @@ export const initializeWidget = (
|
||||
baseUrl,
|
||||
e2eEnabled,
|
||||
allowIceFallback,
|
||||
enableClientWellKnownLookups,
|
||||
} = getUrlParams();
|
||||
|
||||
if (!roomId) throw new Error("Room ID must be supplied");
|
||||
@@ -195,7 +196,13 @@ export const initializeWidget = (
|
||||
// Wait for the config file to be ready (we load very early on so it might not
|
||||
// be otherwise)
|
||||
await Config.init();
|
||||
await client.startClient({ clientWellKnownPollPeriod: 60 * 10 });
|
||||
// Leaving `clientWellKnownPollPeriod` unset stops the SDK polling the
|
||||
// homeserver's `server_name` `.well-known` after login.
|
||||
await client.startClient({
|
||||
clientWellKnownPollPeriod: enableClientWellKnownLookups
|
||||
? 60 * 10
|
||||
: undefined,
|
||||
});
|
||||
return client;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user