Remove mistaken param
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
c3eb517700
commit
4b2a9a6bf7
1 changed files with 2 additions and 3 deletions
|
@ -146,11 +146,10 @@ export function avatarUrlForRoom(room: Room, width: number, height: number, resi
|
||||||
// space rooms cannot be DMs so skip the rest
|
// space rooms cannot be DMs so skip the rest
|
||||||
if (SettingsStore.getValue("feature_spaces") && room.isSpaceRoom()) return null;
|
if (SettingsStore.getValue("feature_spaces") && room.isSpaceRoom()) return null;
|
||||||
|
|
||||||
const otherUserId = DMRoomMap.shared().getUserIdForRoomId(room.roomId);
|
if (!DMRoomMap.shared().getUserIdForRoomId(room.roomId)) return null;
|
||||||
if (!otherUserId) return null;
|
|
||||||
|
|
||||||
// If there are only two members in the DM use the avatar of the other member
|
// If there are only two members in the DM use the avatar of the other member
|
||||||
const otherMember = room.getAvatarFallbackMember(otherUserId);
|
const otherMember = room.getAvatarFallbackMember();
|
||||||
if (otherMember?.getMxcAvatarUrl()) {
|
if (otherMember?.getMxcAvatarUrl()) {
|
||||||
return mediaFromMxc(otherMember.getMxcAvatarUrl()).getThumbnailOfSourceHttp(width, height, resizeMethod);
|
return mediaFromMxc(otherMember.getMxcAvatarUrl()).getThumbnailOfSourceHttp(width, height, resizeMethod);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue