diff --git a/src/stores/widgets/StopGapWidget.ts b/src/stores/widgets/StopGapWidget.ts index eb37ad8cbf3..79e16706042 100644 --- a/src/stores/widgets/StopGapWidget.ts +++ b/src/stores/widgets/StopGapWidget.ts @@ -298,18 +298,18 @@ export class StopGapWidget extends EventEmitter { ActiveWidgetStore.setRoomId(this.mockWidget.id, this.appTileProps.room.roomId); } - if (WidgetType.JITSI.matches(this.mockWidget.type)) { - this.messaging.on("action:set_always_on_screen", - (ev: CustomEvent) => { - if (this.messaging.hasCapability(MatrixCapabilities.AlwaysOnScreen)) { - CountlyAnalytics.instance.trackJoinCall(this.appTileProps.room.roomId, true, true); - ActiveWidgetStore.setWidgetPersistence(this.mockWidget.id, ev.detail.data.value); - ev.preventDefault(); - this.messaging.transport.reply(ev.detail, {}); // ack - } - }, - ); - } else if (WidgetType.STICKERPICKER.matches(this.mockWidget.type)) { + this.messaging.on("action:set_always_on_screen", + (ev: CustomEvent) => { + if (this.messaging.hasCapability(MatrixCapabilities.AlwaysOnScreen)) { + CountlyAnalytics.instance.trackJoinCall(this.appTileProps.room.roomId, true, true); + ActiveWidgetStore.setWidgetPersistence(this.mockWidget.id, ev.detail.data.value); + ev.preventDefault(); + this.messaging.transport.reply(ev.detail, {}); // ack + } + }, + ); + + if (WidgetType.STICKERPICKER.matches(this.mockWidget.type)) { this.messaging.on(`action:${ElementWidgetActions.OpenIntegrationManager}`, (ev: CustomEvent) => { // Acknowledge first diff --git a/src/utils/WidgetUtils.ts b/src/utils/WidgetUtils.ts index 526c2d5ce75..3c6c8022467 100644 --- a/src/utils/WidgetUtils.ts +++ b/src/utils/WidgetUtils.ts @@ -445,14 +445,11 @@ export default class WidgetUtils { static getCapWhitelistForAppTypeInRoomId(appType: string, roomId: string): Capability[] { const enableScreenshots = SettingsStore.getValue("enableWidgetScreenshots", roomId); - const capWhitelist = enableScreenshots ? [MatrixCapabilities.Screenshots] : []; + const capWhitelist = []; - // 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); - } + if (enableScreenshots) capWhitelist.push(MatrixCapabilities.Screenshots) + + capWhitelist.push(MatrixCapabilities.AlwaysOnScreen); return capWhitelist; }