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.
This commit is contained in:
2026-06-06 10:51:23 +02:00
parent acdbc4b63d
commit d5b6aa742e
@@ -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<Widget, Capability> = {
// Automatically approve all capabilities for widgets from api.healthchat.ch domain
preapproveCapabilities: async (
widget: Widget,
requestedCapabilities: Set<Capability>,
): Promise<Set<Capability>> => {
// 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<Widget, Capability> = {};