From 274eb75c3825c73bd23dcdcc12b69bb8860ef073 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 1 Apr 2020 10:40:03 +0100 Subject: [PATCH] Remove get-config API which is no longer necessary now the jitsi wrapper has its own external-api script --- src/FromWidgetPostMessageApi.js | 7 ------- src/SdkConfig.ts | 2 -- src/utils/WidgetUtils.js | 1 - src/widgets/WidgetApi.ts | 10 ---------- 4 files changed, 20 deletions(-) diff --git a/src/FromWidgetPostMessageApi.js b/src/FromWidgetPostMessageApi.js index ea76c85643..2811358a36 100644 --- a/src/FromWidgetPostMessageApi.js +++ b/src/FromWidgetPostMessageApi.js @@ -220,13 +220,6 @@ export default class FromWidgetPostMessageApi { } } else if (action === 'get_openid') { // Handled by caller - } else if (action === KnownWidgetActions.GetRiotWebConfig) { - if (ActiveWidgetStore.widgetHasCapability(widgetId, Capability.GetRiotWebConfig)) { - this.sendResponse(event, { - api: INBOUND_API_NAME, - config: SdkConfig.get(), - }); - } } else { console.warn('Widget postMessage event unhandled'); this.sendError(event, {message: 'The postMessage was unhandled'}); diff --git a/src/SdkConfig.ts b/src/SdkConfig.ts index 34f3402334..400d29a20f 100644 --- a/src/SdkConfig.ts +++ b/src/SdkConfig.ts @@ -30,8 +30,6 @@ export const DEFAULTS: ConfigOptions = { jitsi: { // Default conference domain preferredDomain: "jitsi.riot.im", - // Default Jitsi Meet API location - externalApiUrl: "https://jitsi.riot.im/libs/external_api.min.js", }, }; diff --git a/src/utils/WidgetUtils.js b/src/utils/WidgetUtils.js index d41e249a42..9fb6358c1f 100644 --- a/src/utils/WidgetUtils.js +++ b/src/utils/WidgetUtils.js @@ -404,7 +404,6 @@ export default class WidgetUtils { // widgets from at all, but it probably makes sense for sanity. if (appType === 'jitsi') { capWhitelist.push(Capability.AlwaysOnScreen); - capWhitelist.push(Capability.GetRiotWebConfig); } return capWhitelist; diff --git a/src/widgets/WidgetApi.ts b/src/widgets/WidgetApi.ts index d6d1c79a99..05237d258f 100644 --- a/src/widgets/WidgetApi.ts +++ b/src/widgets/WidgetApi.ts @@ -23,7 +23,6 @@ export enum Capability { Screenshot = "m.capability.screenshot", Sticker = "m.sticker", AlwaysOnScreen = "m.always_on_screen", - GetRiotWebConfig = "im.vector.web.riot_config", } export enum KnownWidgetActions { @@ -34,7 +33,6 @@ export enum KnownWidgetActions { UpdateVisibility = "visibility", ReceiveOpenIDCredentials = "openid_credentials", SetAlwaysOnScreen = "set_always_on_screen", - GetRiotWebConfig = "im.vector.web.riot_config", ClientReady = "im.vector.ready", } @@ -157,12 +155,4 @@ export class WidgetApi { resolve(); // SetAlwaysOnScreen is currently fire-and-forget, but that could change. }); } - - public getRiotConfig(): Promise { - return new Promise(resolve => { - this.callAction(KnownWidgetActions.GetRiotWebConfig, {}, response => { - resolve(response.response.config); - }); - }); - } }