From 22bde9fd50db11105e801c9a174a63c1e05ee698 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 18 Jul 2018 12:05:32 +0100 Subject: [PATCH] Read jitsi widget URL from config --- src/CallHandler.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/CallHandler.js b/src/CallHandler.js index d9390310d6..cb1dfbc33a 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -444,11 +444,15 @@ function _startCallApp(roomId, type) { 'avatarUrl=$matrix_avatar_url', 'email=$matrix_user_id', ].join('&'); - const widgetUrl = ( - SdkConfig.get().integrations_rest_url + - '/widgets/jitsi.html?' + - queryString - ); + + let widgetUrl; + if (SdkConfig.get().integrations_jitsi_widget_url) { + // 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 };