Read jitsi widget URL from config

This commit is contained in:
David Baker 2018-07-18 12:05:32 +01:00
parent e95a8e82bc
commit 22bde9fd50

View file

@ -444,11 +444,15 @@ function _startCallApp(roomId, type) {
'avatarUrl=$matrix_avatar_url', 'avatarUrl=$matrix_avatar_url',
'email=$matrix_user_id', 'email=$matrix_user_id',
].join('&'); ].join('&');
const widgetUrl = (
SdkConfig.get().integrations_rest_url + let widgetUrl;
'/widgets/jitsi.html?' + if (SdkConfig.get().integrations_jitsi_widget_url) {
queryString // Try this config key. This probably isn't ideal as a way of discovering this
); // URL, but this will at least allow the integration manager to not be hardcoded.
widgetUrl = SdkConfig.get().integrations_jitsi_widget_url + '?' + queryString;
} else {
widgetUrl = SdkConfig.get().integrations_rest_url + '/widgets/jitsi.html?' + queryString;
}
const widgetData = { widgetSessionId }; const widgetData = { widgetSessionId };