Only try to convert mxc URL when the room actually has an avatar
This commit is contained in:
parent
e7023012cc
commit
2102e76d5e
|
@ -907,7 +907,9 @@ router.get(
|
||||||
const pageOptions = {
|
const pageOptions = {
|
||||||
title: `${roomData.name} - Matrix Public Archive`,
|
title: `${roomData.name} - Matrix Public Archive`,
|
||||||
description: `View the history of ${roomData.name} in the Matrix Public Archive`,
|
description: `View the history of ${roomData.name} in the Matrix Public Archive`,
|
||||||
imageUrl: mxcUrlToHttpThumbnail({
|
imageUrl:
|
||||||
|
roomData.avatarUrl &&
|
||||||
|
mxcUrlToHttpThumbnail({
|
||||||
mxcUrl: roomData.avatarUrl,
|
mxcUrl: roomData.avatarUrl,
|
||||||
homeserverUrl: matrixServerUrl,
|
homeserverUrl: matrixServerUrl,
|
||||||
size: 256,
|
size: 256,
|
||||||
|
|
Loading…
Reference in New Issue