Merge pull request #4845 from matrix-org/t3chguy/hf1

ts-ignore because something is made of fail
This commit is contained in:
Michael Telatynski 2020-06-26 10:10:18 +01:00 committed by GitHub
commit 113dfc5ed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,8 @@ limitations under the License.
*/ */
import React, { createRef } from 'react'; import React, { createRef } from 'react';
import { createClient } from "matrix-js-sdk/src"; // @ts-ignore - XXX: no idea why this import fails
import * as Matrix from "matrix-js-sdk";
import { InvalidStoreError } from "matrix-js-sdk/src/errors"; import { InvalidStoreError } from "matrix-js-sdk/src/errors";
import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { MatrixEvent } from "matrix-js-sdk/src/models/event";
@ -1618,7 +1619,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
let cli = MatrixClientPeg.get(); let cli = MatrixClientPeg.get();
if (!cli) { if (!cli) {
const {hsUrl, isUrl} = this.props.serverConfig; const {hsUrl, isUrl} = this.props.serverConfig;
cli = createClient({ cli = Matrix.createClient({
baseUrl: hsUrl, baseUrl: hsUrl,
idBaseUrl: isUrl, idBaseUrl: isUrl,
}); });