This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,8 @@ async function _startCallApp(roomId, type) {
427427 // URL, but this will at least allow the integration manager to not be hardcoded.
428428 widgetUrl = SdkConfig . get ( ) . integrations_jitsi_widget_url + '?' + queryString ;
429429 } else {
430- widgetUrl = SdkConfig . get ( ) . integrations_rest_url + '/widgets/jitsi.html?' + queryString ;
430+ const apiUrl = IntegrationManagers . sharedInstance ( ) . getPrimaryManager ( ) . apiUrl ;
431+ widgetUrl = apiUrl + '/widgets/jitsi.html?' + queryString ;
431432 }
432433
433434 const widgetData = { widgetSessionId } ;
Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ import dis from './dispatcher';
239239import WidgetUtils from './utils/WidgetUtils' ;
240240import RoomViewStore from './stores/RoomViewStore' ;
241241import { _t } from './languageHandler' ;
242+ import { IntegrationManagers } from "./integrations/IntegrationManagers" ;
242243
243244function sendResponse ( event , res ) {
244245 const data = JSON . parse ( JSON . stringify ( event . data ) ) ;
@@ -548,7 +549,8 @@ const onMessage = function(event) {
548549 // (See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
549550 let configUrl ;
550551 try {
551- configUrl = new URL ( SdkConfig . get ( ) . integrations_ui_url ) ;
552+ // TODO: Support multiple integration managers
553+ configUrl = new URL ( IntegrationManagers . sharedInstance ( ) . getPrimaryManager ( ) . uiUrl ) ;
552554 } catch ( e ) {
553555 // No integrations UI URL, ignore silently.
554556 return ;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import WidgetEchoStore from '../stores/WidgetEchoStore';
2727const WIDGET_WAIT_TIME = 20000 ;
2828import SettingsStore from "../settings/SettingsStore" ;
2929import ActiveWidgetStore from "../stores/ActiveWidgetStore" ;
30+ import { IntegrationManagers } from "../integrations/IntegrationManagers" ;
3031
3132/**
3233 * Encodes a URI according to a set of template variables. Variables will be
@@ -102,7 +103,8 @@ export default class WidgetUtils {
102103
103104 let scalarUrls = SdkConfig . get ( ) . integrations_widgets_urls ;
104105 if ( ! scalarUrls || scalarUrls . length === 0 ) {
105- scalarUrls = [ SdkConfig . get ( ) . integrations_rest_url ] ;
106+ const defaultManager = IntegrationManagers . sharedInstance ( ) . getPrimaryManager ( ) ;
107+ if ( defaultManager ) scalarUrls = [ defaultManager . apiUrl ] ;
106108 }
107109
108110 for ( let i = 0 ; i < scalarUrls . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments