diff --git a/assets/config.json b/assets/config.json index a98c5ba9..703ae1e6 100644 --- a/assets/config.json +++ b/assets/config.json @@ -3,5 +3,6 @@ "appId": "io.element.hydrogen.web", "gatewayUrl": "https://matrix.org", "applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM" - } + }, + "defaultHomeServer": "matrix.org" } diff --git a/src/domain/RootViewModel.js b/src/domain/RootViewModel.js index cb22bee2..f6e566e3 100644 --- a/src/domain/RootViewModel.js +++ b/src/domain/RootViewModel.js @@ -99,7 +99,7 @@ export class RootViewModel extends ViewModel { _showLogin() { this._setSection(() => { this._loginViewModel = new LoginViewModel(this.childOptions({ - defaultHomeServer: "https://matrix.org", + defaultHomeServer: this.platform.config["defaultHomeServer"], createSessionContainer: this._createSessionContainer, ready: sessionContainer => { // we don't want to load the session container again, diff --git a/src/platform/web/Platform.js b/src/platform/web/Platform.js index 747855de..549d49c3 100644 --- a/src/platform/web/Platform.js +++ b/src/platform/web/Platform.js @@ -125,6 +125,10 @@ export class Platform { return loadOlm(this._config.olm); } + get config() { + return this._config; + } + async loadOlmWorker() { if (!window.WebAssembly) { return await loadOlmWorker(this._config);