From e52c7fe03ad599e1760a8fe86cdcf26d0f89c65d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 6 May 2022 13:09:53 -0600 Subject: [PATCH] Remove dead function in WidgetUtils relating to screenshots/capabilities We always approve the capability these days --- src/utils/WidgetUtils.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index 8537e03583..cd22562b81 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -17,7 +17,7 @@ limitations under the License. import * as url from "url"; import { base32 } from "rfc4648"; -import { Capability, IWidget, IWidgetData, MatrixCapabilities } from "matrix-widget-api"; +import { IWidget, IWidgetData } from "matrix-widget-api"; import { Room } from "matrix-js-sdk/src/models/room"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { logger } from "matrix-js-sdk/src/logger"; @@ -496,21 +496,6 @@ export default class WidgetUtils { return app as IApp; } - static getCapWhitelistForAppTypeInRoomId(appType: string, roomId: string): Capability[] { - const enableScreenshots = SettingsStore.getValue("enableWidgetScreenshots", roomId); - - const capWhitelist = enableScreenshots ? [MatrixCapabilities.Screenshots] : []; - - // Obviously anyone that can add a widget can claim it's a jitsi widget, - // so this doesn't really offer much over the set of domains we load - // widgets from at all, but it probably makes sense for sanity. - if (WidgetType.JITSI.matches(appType)) { - capWhitelist.push(MatrixCapabilities.AlwaysOnScreen); - } - - return capWhitelist; - } - static getLocalJitsiWrapperUrl(opts: {forLocalRender?: boolean, auth?: string} = {}) { // NB. we can't just encodeURIComponent all of these because the $ signs need to be there const queryStringParts = [