From e2b5d161cb782a1bfb0f6ca156b3d86e6582a4ff Mon Sep 17 00:00:00 2001 From: Robert Long Date: Mon, 26 Jul 2021 11:44:25 -0700 Subject: [PATCH] Use browser build of matrix-js-sdk --- index.html | 1 + src/App.jsx | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index dc0a80e5..4405ca35 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ +
diff --git a/src/App.jsx b/src/App.jsx index 0dcf9b1c..7b22e3c0 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -15,7 +15,6 @@ limitations under the License. */ import React, { useCallback, useEffect, useRef, useState } from "react"; -import * as sdk from "matrix-js-sdk"; import "./App.css"; import { BrowserRouter as Router, @@ -91,7 +90,7 @@ function useClient(homeserverUrl) { if (authStore) { const { user_id, device_id, access_token } = JSON.parse(authStore); - const client = sdk.createClient({ + const client = matrixcs.createClient({ baseUrl: homeserverUrl, accessToken: access_token, userId: user_id, @@ -139,12 +138,12 @@ function useClient(homeserverUrl) { error: undefined, })); - const registrationClient = sdk.createClient(homeserverUrl); + const registrationClient = matrixcs.createClient(homeserverUrl); const { user_id, device_id, access_token } = await registrationClient.loginWithPassword(username, password); - const client = sdk.createClient({ + const client = matrixcs.createClient({ baseUrl: homeserverUrl, accessToken: access_token, userId: user_id, @@ -183,14 +182,14 @@ function useClient(homeserverUrl) { error: undefined, })); - const registrationClient = sdk.createClient(homeserverUrl); + const registrationClient = matrixcs.createClient(homeserverUrl); const { user_id, device_id, access_token } = await registrationClient.register(username, password, null, { type: "m.login.dummy", }); - const client = sdk.createClient({ + const client = matrixcs.createClient({ baseUrl: homeserverUrl, accessToken: access_token, userId: user_id,