Disable URL Preview setting if disabled on the homeserver (#33279)

* Disallow URL Previews if disabled by homeserver.

* Cleanup nonsense

* cleanup

* cleanup

* fixes

* Remove import

* Add an error handler

* cleanup
This commit is contained in:
Will Hunt
2026-04-28 15:08:22 +00:00
committed by GitHub
parent 72d316df79
commit 2b943768ea
8 changed files with 181 additions and 9 deletions
@@ -71,6 +71,7 @@ import ErrorDialog from "../../../../src/components/views/dialogs/ErrorDialog.ts
import * as pinnedEventHooks from "../../../../src/hooks/usePinnedEvents";
import { TimelineRenderingType } from "../../../../src/contexts/RoomContext";
import { ModuleApi } from "../../../../src/modules/Api";
import MatrixClientBackedController from "../../../../src/settings/controllers/MatrixClientBackedController.ts";
import { type ComposerInsertPayload, ComposerType } from "../../../../src/dispatcher/payloads/ComposerInsertPayload.ts";
// Used by group calls
@@ -93,6 +94,7 @@ describe("RoomView", () => {
beforeEach(() => {
mockPlatformPeg({ reload: () => {} });
cli = mocked(stubClient());
MatrixClientBackedController.matrixClient = cli;
const roomName = (expect.getState().currentTestName ?? "").replace(/[^a-zA-Z0-9]/g, "").toLowerCase();