1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Use the default integration manager for config options

This commit is contained in:
Travis Ralston
2019-08-09 17:08:26 -06:00
parent 5a15e78fe4
commit 018b4f5d41
3 changed files with 8 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import WidgetEchoStore from '../stores/WidgetEchoStore';
const WIDGET_WAIT_TIME = 20000;
import SettingsStore from "../settings/SettingsStore";
import ActiveWidgetStore from "../stores/ActiveWidgetStore";
import {IntegrationManagers} from "../integrations/IntegrationManagers";
/**
* Encodes a URI according to a set of template variables. Variables will be
@@ -102,7 +103,8 @@ export default class WidgetUtils {
let scalarUrls = SdkConfig.get().integrations_widgets_urls;
if (!scalarUrls || scalarUrls.length === 0) {
scalarUrls = [SdkConfig.get().integrations_rest_url];
const defaultManager = IntegrationManagers.sharedInstance().getPrimaryManager();
if (defaultManager) scalarUrls = [defaultManager.apiUrl];
}
for (let i = 0; i < scalarUrls.length; i++) {