mirror of https://github.com/vector-im/riot-web
Remove get-config API
which is no longer necessary now the jitsi wrapper has its own external-api scriptpull/21833/head
parent
538147f7fa
commit
274eb75c38
|
@ -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'});
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<any> {
|
||||
return new Promise<any>(resolve => {
|
||||
this.callAction(KnownWidgetActions.GetRiotWebConfig, {}, response => {
|
||||
resolve(response.response.config);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue