Use new imports for js-sdk's ContentRepo

Per f4d1c5c006
This commit is contained in:
Travis Ralston 2020-01-03 12:29:22 -07:00
parent 3eb3be45d1
commit 9edc361afc
4 changed files with 8 additions and 8 deletions

View file

@ -18,7 +18,6 @@ limitations under the License.
import React from 'react';
import createReactClass from 'create-react-class';
import {ContentRepo} from "matrix-js-sdk";
import {MatrixClientPeg} from "../../MatrixClientPeg";
import * as sdk from "../../index";
import dis from "../../dispatcher";
@ -28,6 +27,7 @@ import PropTypes from 'prop-types';
import { _t } from '../../languageHandler';
import { instanceForInstanceId, protocolNameForInstanceId } from '../../utils/DirectoryUtils';
import Analytics from '../../Analytics';
import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo";
const MAX_NAME_LENGTH = 80;
const MAX_TOPIC_LENGTH = 160;
@ -463,7 +463,7 @@ export default createReactClass({
topic = `${topic.substring(0, MAX_TOPIC_LENGTH)}...`;
}
topic = linkifyAndSanitizeHtml(topic);
const avatarUrl = ContentRepo.getHttpUriForMxc(
const avatarUrl = getHttpUriForMxc(
MatrixClientPeg.get().getHomeserverUrl(),
room.avatar_url, 32, 32, "crop",
);