Remove get-config API
which is no longer necessary now the jitsi wrapper has its own external-api script
This commit is contained in:
parent
6df4a44cc1
commit
d92a19ecff
4 changed files with 0 additions and 20 deletions
|
@ -220,13 +220,6 @@ export default class FromWidgetPostMessageApi {
|
||||||
}
|
}
|
||||||
} else if (action === 'get_openid') {
|
} else if (action === 'get_openid') {
|
||||||
// Handled by caller
|
// 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 {
|
} else {
|
||||||
console.warn('Widget postMessage event unhandled');
|
console.warn('Widget postMessage event unhandled');
|
||||||
this.sendError(event, {message: 'The postMessage was unhandled'});
|
this.sendError(event, {message: 'The postMessage was unhandled'});
|
||||||
|
|
|
@ -30,8 +30,6 @@ export const DEFAULTS: ConfigOptions = {
|
||||||
jitsi: {
|
jitsi: {
|
||||||
// Default conference domain
|
// Default conference domain
|
||||||
preferredDomain: "jitsi.riot.im",
|
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.
|
// widgets from at all, but it probably makes sense for sanity.
|
||||||
if (appType === 'jitsi') {
|
if (appType === 'jitsi') {
|
||||||
capWhitelist.push(Capability.AlwaysOnScreen);
|
capWhitelist.push(Capability.AlwaysOnScreen);
|
||||||
capWhitelist.push(Capability.GetRiotWebConfig);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return capWhitelist;
|
return capWhitelist;
|
||||||
|
|
|
@ -23,7 +23,6 @@ export enum Capability {
|
||||||
Screenshot = "m.capability.screenshot",
|
Screenshot = "m.capability.screenshot",
|
||||||
Sticker = "m.sticker",
|
Sticker = "m.sticker",
|
||||||
AlwaysOnScreen = "m.always_on_screen",
|
AlwaysOnScreen = "m.always_on_screen",
|
||||||
GetRiotWebConfig = "im.vector.web.riot_config",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum KnownWidgetActions {
|
export enum KnownWidgetActions {
|
||||||
|
@ -34,7 +33,6 @@ export enum KnownWidgetActions {
|
||||||
UpdateVisibility = "visibility",
|
UpdateVisibility = "visibility",
|
||||||
ReceiveOpenIDCredentials = "openid_credentials",
|
ReceiveOpenIDCredentials = "openid_credentials",
|
||||||
SetAlwaysOnScreen = "set_always_on_screen",
|
SetAlwaysOnScreen = "set_always_on_screen",
|
||||||
GetRiotWebConfig = "im.vector.web.riot_config",
|
|
||||||
ClientReady = "im.vector.ready",
|
ClientReady = "im.vector.ready",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,12 +155,4 @@ export class WidgetApi {
|
||||||
resolve(); // SetAlwaysOnScreen is currently fire-and-forget, but that could change.
|
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 a new issue