Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

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

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SdkConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const DEFAULTS: ConfigOptions = {
// Jitsi conference options
jitsi: {
// Default conference domain
preferredDomain: "jitsi.riot.im",
preferredDomain: "meet.element.io",
},
desktopBuilds: {
available: true,
Expand Down
4 changes: 2 additions & 2 deletions src/stores/widgets/StopGapWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export class ElementWidget extends Widget {
}
let domain = super.rawData['domain'];
if (domain === undefined) {
// v1 widgets default to jitsi.riot.im regardless of user settings
domain = "jitsi.riot.im";
// v1 widgets default to meet.element.io regardless of user settings
domain = "meet.element.io";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessarily true, but fine so long as we don't change the infrastructure.

}

let theme = new ThemeWatcher().getEffectiveTheme();
Expand Down
13 changes: 6 additions & 7 deletions src/widgets/Jitsi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.
*/

import { logger } from "matrix-js-sdk/src/logger";
import { IClientWellKnown } from "matrix-js-sdk/src/client";

import SdkConfig from "../SdkConfig";
import { MatrixClientPeg } from "../MatrixClientPeg";
Expand All @@ -33,7 +34,7 @@ export class Jitsi {
private domain: string;

public get preferredDomain(): string {
return this.domain || 'jitsi.riot.im';
return this.domain || "meet.element.io";
}

/**
Expand Down Expand Up @@ -67,15 +68,13 @@ export class Jitsi {
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
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");
if (discoveryResponse && discoveryResponse[JITSI_WK_PROPERTY]) {
const wkPreferredDomain = discoveryResponse[JITSI_WK_PROPERTY]['preferredDomain'];
if (wkPreferredDomain) domain = wkPreferredDomain;
}
const wkPreferredDomain = discoveryResponse?.[JITSI_WK_PROPERTY]?.['preferredDomain'];
if (wkPreferredDomain) domain = wkPreferredDomain;

// Put the result into memory for us to use later
this.domain = domain;
Expand Down