forked from mystiq/hydrogen-web
Allow specifying a custom defaultHomeServer
This commit is contained in:
parent
f4bb95f459
commit
6bdf7f1ee9
3 changed files with 7 additions and 2 deletions
|
@ -3,5 +3,6 @@
|
||||||
"appId": "io.element.hydrogen.web",
|
"appId": "io.element.hydrogen.web",
|
||||||
"gatewayUrl": "https://matrix.org",
|
"gatewayUrl": "https://matrix.org",
|
||||||
"applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM"
|
"applicationServerKey": "BC-gpSdVHEXhvHSHS0AzzWrQoukv2BE7KzpoPO_FfPacqOo3l1pdqz7rSgmB04pZCWaHPz7XRe6fjLaC-WPDopM"
|
||||||
}
|
},
|
||||||
|
"defaultHomeServer": "matrix.org"
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ export class RootViewModel extends ViewModel {
|
||||||
_showLogin() {
|
_showLogin() {
|
||||||
this._setSection(() => {
|
this._setSection(() => {
|
||||||
this._loginViewModel = new LoginViewModel(this.childOptions({
|
this._loginViewModel = new LoginViewModel(this.childOptions({
|
||||||
defaultHomeServer: "https://matrix.org",
|
defaultHomeServer: this.platform.config["defaultHomeServer"],
|
||||||
createSessionContainer: this._createSessionContainer,
|
createSessionContainer: this._createSessionContainer,
|
||||||
ready: sessionContainer => {
|
ready: sessionContainer => {
|
||||||
// we don't want to load the session container again,
|
// we don't want to load the session container again,
|
||||||
|
|
|
@ -125,6 +125,10 @@ export class Platform {
|
||||||
return loadOlm(this._config.olm);
|
return loadOlm(this._config.olm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get config() {
|
||||||
|
return this._config;
|
||||||
|
}
|
||||||
|
|
||||||
async loadOlmWorker() {
|
async loadOlmWorker() {
|
||||||
if (!window.WebAssembly) {
|
if (!window.WebAssembly) {
|
||||||
return await loadOlmWorker(this._config);
|
return await loadOlmWorker(this._config);
|
||||||
|
|
Loading…
Reference in a new issue