1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Consistent async / await / promises.

This commit is contained in:
Richard Lewis
2018-03-29 17:56:12 +01:00
parent b1e7dcf216
commit 3d9bdb90ca

View File

@@ -25,13 +25,13 @@ if (!global.mxIntegrationManager) {
}
export default class IntegrationManager {
static async _init() {
static _init() {
if (!global.mxIntegrationManager.client || !global.mxIntegrationManager.connected) {
if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) {
ScalarMessaging.startListening();
global.mxIntegrationManager.client = new ScalarAuthClient();
await global.mxIntegrationManager.client.connect().then(() => {
return global.mxIntegrationManager.client.connect().then(() => {
global.mxIntegrationManager.connected = true;
}).catch((e) => {
console.error("Failed to connect to integrations server", e);