From f45aa85aefae65d87dd93987eb7163e37e512837 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Mon, 10 Mar 2025 18:12:33 +0000 Subject: [PATCH 1/2] Remove default server config as it is not likely to be correct --- src/config/ConfigOptions.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/config/ConfigOptions.ts b/src/config/ConfigOptions.ts index 49f3d2eec..2ec113f1c 100644 --- a/src/config/ConfigOptions.ts +++ b/src/config/ConfigOptions.ts @@ -125,12 +125,6 @@ export interface ConfigOptions { // Overrides members from ConfigOptions that are always provided by the // default config and are therefore non-optional. export interface ResolvedConfigOptions extends ConfigOptions { - default_server_config: { - ["m.homeserver"]: { - base_url: string; - server_name: string; - }; - }; media_devices: { enable_audio: boolean; enable_video: boolean; @@ -139,12 +133,6 @@ export interface ResolvedConfigOptions extends ConfigOptions { } export const DEFAULT_CONFIG: ResolvedConfigOptions = { - default_server_config: { - ["m.homeserver"]: { - base_url: "http://localhost:8008", - server_name: "localhost", - }, - }, features: { feature_use_device_session_member_events: true, }, From 11a6fa9b457c0de23162e1d112e45b7822c053c7 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 3 Aug 2026 10:32:52 +0200 Subject: [PATCH 2/2] Fix tests --- src/UrlParams.test.ts | 3 +++ src/utils/test.ts | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/UrlParams.test.ts b/src/UrlParams.test.ts index 75bf9bfb8..3a61a76b9 100644 --- a/src/UrlParams.test.ts +++ b/src/UrlParams.test.ts @@ -16,12 +16,15 @@ import { HeaderStyle, getUrlParams, } from "../src/UrlParams"; +import { mockConfig } from "./utils/test"; const ROOM_NAME = "roomNameHere"; const ROOM_ID = "!d45f138fsd"; const ORIGIN = "https://call.element.io"; const HOMESERVER = "localhost"; +mockConfig(); + describe("UrlParams", () => { describe("handles URL with /room/", () => { it("and nothing else", () => { diff --git a/src/utils/test.ts b/src/utils/test.ts index 695dd0462..206db88f5 100644 --- a/src/utils/test.ts +++ b/src/utils/test.ts @@ -439,6 +439,12 @@ export function mockConfig( const spy = vi.spyOn(Config, "get").mockReturnValue({ ...DEFAULT_CONFIG, ...config, + default_server_config: { + ["m.homeserver"]: { + base_url: "http://localhost:8008", + server_name: "localhost", + }, + }, }); // simulate loading the config vi.spyOn(Config, "init").mockResolvedValue(void 0);