Update default Jitsi URLs to meet.element.io (#7514)

This commit is contained in:
Michael Telatynski 2022-01-11 16:15:20 +00:00 committed by GitHub
parent beac9563d6
commit ec02f82416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 10 deletions

View file

@ -40,7 +40,7 @@ export const DEFAULTS: ConfigOptions = {
// Jitsi conference options // Jitsi conference options
jitsi: { jitsi: {
// Default conference domain // Default conference domain
preferredDomain: "jitsi.riot.im", preferredDomain: "meet.element.io",
}, },
desktopBuilds: { desktopBuilds: {
available: true, available: true,

View file

@ -109,8 +109,8 @@ export class ElementWidget extends Widget {
} }
let domain = super.rawData['domain']; let domain = super.rawData['domain'];
if (domain === undefined) { if (domain === undefined) {
// v1 widgets default to jitsi.riot.im regardless of user settings // v1 widgets default to meet.element.io regardless of user settings
domain = "jitsi.riot.im"; domain = "meet.element.io";
} }
let theme = new ThemeWatcher().getEffectiveTheme(); let theme = new ThemeWatcher().getEffectiveTheme();

View file

@ -15,6 +15,7 @@ limitations under the License.
*/ */
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/src/logger";
import { IClientWellKnown } from "matrix-js-sdk/src/client";
import SdkConfig from "../SdkConfig"; import SdkConfig from "../SdkConfig";
import { MatrixClientPeg } from "../MatrixClientPeg"; import { MatrixClientPeg } from "../MatrixClientPeg";
@ -33,7 +34,7 @@ export class Jitsi {
private domain: string; private domain: string;
public get preferredDomain(): string { public get preferredDomain(): string {
return this.domain || 'jitsi.riot.im'; return this.domain || "meet.element.io";
} }
/** /**
@ -67,15 +68,13 @@ export class Jitsi {
this.update(cli.getClientWellKnown()); this.update(cli.getClientWellKnown());
} }
private update = async (discoveryResponse): Promise<any> => { private update = async (discoveryResponse: IClientWellKnown): Promise<any> => {
// Start with a default of the config's domain // Start with a default of the config's domain
let domain = (SdkConfig.get()['jitsi'] || {})['preferredDomain'] || 'jitsi.riot.im'; let domain = SdkConfig.get().jitsi?.preferredDomain || "meet.element.io";
logger.log("Attempting to get Jitsi conference information from homeserver"); logger.log("Attempting to get Jitsi conference information from homeserver");
if (discoveryResponse && discoveryResponse[JITSI_WK_PROPERTY]) { const wkPreferredDomain = discoveryResponse?.[JITSI_WK_PROPERTY]?.['preferredDomain'];
const wkPreferredDomain = discoveryResponse[JITSI_WK_PROPERTY]['preferredDomain'];
if (wkPreferredDomain) domain = wkPreferredDomain; if (wkPreferredDomain) domain = wkPreferredDomain;
}
// Put the result into memory for us to use later // Put the result into memory for us to use later
this.domain = domain; this.domain = domain;