From d5b6aa742e14df77c854201b04727320ac31e1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl?= Date: Sat, 6 Jun 2026 10:51:23 +0200 Subject: [PATCH] revert: drop in-tree WidgetPermissionCustomisations (handled by plugin) HealthChat's preapproveCapabilities customisation returned undefined for non-HealthChat widgets, which short-circuits master's reworked validateCapabilities flow (it falls back to the customisation whenever it is defined). The api.healthchat.ch auto-approval is handled by the plugin, so restore the empty upstream customisations object. --- apps/web/src/customisations/WidgetPermissions.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/apps/web/src/customisations/WidgetPermissions.ts b/apps/web/src/customisations/WidgetPermissions.ts index 35efa1202f..785ca46c2e 100644 --- a/apps/web/src/customisations/WidgetPermissions.ts +++ b/apps/web/src/customisations/WidgetPermissions.ts @@ -13,18 +13,4 @@ import type { WidgetPermissionsCustomisations } from "@element-hq/element-web-mo // A real customisation module will define and export one or more of the // customisation points that make up the interface above. -export const WidgetPermissionCustomisations: WidgetPermissionsCustomisations = { - // Automatically approve all capabilities for widgets from api.healthchat.ch domain - preapproveCapabilities: async ( - widget: Widget, - requestedCapabilities: Set, - ): Promise> => { - // Check if the widget URL contains api.healthchat.ch - if (widget.templateUrl?.includes("api.healthchat.ch")) { - // Return all requested capabilities as approved - return new Set(requestedCapabilities); - } - // Return undefined to fall back to default behavior for other widgets - return undefined as any; - }, -}; +export const WidgetPermissionCustomisations: WidgetPermissionsCustomisations = {};