Use new imports for js-sdk's ContentRepo
Per https://github.com/matrix-org/matrix-js-sdk/pull/1134/commits/f4d1c5c006027962cd18dffb3f7c521d9e24e831
This commit is contained in:
+2
-2
@@ -15,9 +15,9 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
import {ContentRepo} from 'matrix-js-sdk';
|
||||
import {MatrixClientPeg} from './MatrixClientPeg';
|
||||
import DMRoomMap from './utils/DMRoomMap';
|
||||
import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo";
|
||||
|
||||
export function avatarUrlForMember(member, width, height, resizeMethod) {
|
||||
let url = member.getAvatarUrl(
|
||||
@@ -38,7 +38,7 @@ export function avatarUrlForMember(member, width, height, resizeMethod) {
|
||||
}
|
||||
|
||||
export function avatarUrlForUser(user, width, height, resizeMethod) {
|
||||
const url = ContentRepo.getHttpUriForMxc(
|
||||
const url = getHttpUriForMxc(
|
||||
MatrixClientPeg.get().getHomeserverUrl(), user.avatarUrl,
|
||||
Math.floor(width * window.devicePixelRatio),
|
||||
Math.floor(height * window.devicePixelRatio),
|
||||
|
||||
Reference in New Issue
Block a user