Merge pull request #3075 from hughns/defaut-server-config

Remove default server config as it is not likely to be correct
This commit is contained in:
Robin
2026-08-03 10:49:49 +02:00
committed by GitHub
3 changed files with 9 additions and 12 deletions
+3
View File
@@ -16,12 +16,15 @@ import {
HeaderStyle, HeaderStyle,
getUrlParams, getUrlParams,
} from "../src/UrlParams"; } from "../src/UrlParams";
import { mockConfig } from "./utils/test";
const ROOM_NAME = "roomNameHere"; const ROOM_NAME = "roomNameHere";
const ROOM_ID = "!d45f138fsd"; const ROOM_ID = "!d45f138fsd";
const ORIGIN = "https://call.element.io"; const ORIGIN = "https://call.element.io";
const HOMESERVER = "localhost"; const HOMESERVER = "localhost";
mockConfig();
describe("UrlParams", () => { describe("UrlParams", () => {
describe("handles URL with /room/", () => { describe("handles URL with /room/", () => {
it("and nothing else", () => { it("and nothing else", () => {
-12
View File
@@ -183,12 +183,6 @@ export interface ConfigOptions {
// Overrides members from ConfigOptions that are always provided by the // Overrides members from ConfigOptions that are always provided by the
// default config and are therefore non-optional. // default config and are therefore non-optional.
export interface ResolvedConfigOptions extends ConfigOptions { export interface ResolvedConfigOptions extends ConfigOptions {
default_server_config: {
["m.homeserver"]: {
base_url: string;
server_name: string;
};
};
sync_disconnect_grace_period_ms: number; sync_disconnect_grace_period_ms: number;
ssla: string; ssla: string;
matrix_rtc_session: { matrix_rtc_session: {
@@ -202,12 +196,6 @@ export interface ResolvedConfigOptions extends ConfigOptions {
} }
export const DEFAULT_CONFIG: ResolvedConfigOptions = { export const DEFAULT_CONFIG: ResolvedConfigOptions = {
default_server_config: {
["m.homeserver"]: {
base_url: "http://localhost:8008",
server_name: "localhost",
},
},
features: { features: {
feature_use_device_session_member_events: true, feature_use_device_session_member_events: true,
}, },
+6
View File
@@ -439,6 +439,12 @@ export function mockConfig(
const spy = vi.spyOn(Config, "get").mockReturnValue({ const spy = vi.spyOn(Config, "get").mockReturnValue({
...DEFAULT_CONFIG, ...DEFAULT_CONFIG,
...config, ...config,
default_server_config: {
["m.homeserver"]: {
base_url: "http://localhost:8008",
server_name: "localhost",
},
},
}); });
// simulate loading the config // simulate loading the config
vi.spyOn(Config, "init").mockResolvedValue(void 0); vi.spyOn(Config, "init").mockResolvedValue(void 0);