Fix room image avatars not showing in the room directory (#133)
Fix room image avatars not showing in the room directory Fix https://github.com/matrix-org/matrix-public-archive/issues/95
This commit is contained in:
parent
3d604a1d87
commit
8a2dabe97b
|
@ -104,9 +104,9 @@ class ArchiveRoomViewModel extends ViewModel {
|
||||||
avatarTitle: this._room.name || this._room.canonicalAlias || this._room.id,
|
avatarTitle: this._room.name || this._room.canonicalAlias || this._room.id,
|
||||||
avatarLetterString:
|
avatarLetterString:
|
||||||
this._room.name ||
|
this._room.name ||
|
||||||
// Strip the `#` off the alias
|
// Skip to the first letter after the `#` sigil from the alias
|
||||||
this._room.canonicalAlias?.[1] ||
|
this._room.canonicalAlias?.[1] ||
|
||||||
// Strip the `!` off the room_id
|
// Skip to the first letter after the `!` sigil from the room ID
|
||||||
this._room.id?.[1],
|
this._room.id?.[1],
|
||||||
entityId: this._room.id,
|
entityId: this._room.id,
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,13 +7,13 @@ class RoomCardView extends TemplateView {
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
const avatarViewModel = new AvatarViewModel({
|
const avatarViewModel = new AvatarViewModel({
|
||||||
homeserverUrlToPullMediaFrom: vm.homeserverUrlToPullMediaFrom,
|
homeserverUrlToPullMediaFrom: vm.homeserverUrlToPullMediaFrom,
|
||||||
avatarUrl: vm.avatarUrl,
|
avatarUrl: vm.mxcAvatarUrl,
|
||||||
avatarTitle: vm.name || vm.canonicalAlias || vm.roomId,
|
avatarTitle: vm.name || vm.canonicalAlias || vm.roomId,
|
||||||
avatarLetterString:
|
avatarLetterString:
|
||||||
vm.name ||
|
vm.name ||
|
||||||
// Strip the `#` off the alias
|
// Skip to the first letter after the `#` sigil from the alias
|
||||||
vm.canonicalAlias?.[1] ||
|
vm.canonicalAlias?.[1] ||
|
||||||
// Strip the `!` off the room_id
|
// Skip to the first letter after the `!` sigil from the room ID
|
||||||
vm.roomId?.[1],
|
vm.roomId?.[1],
|
||||||
entityId: vm.roomId,
|
entityId: vm.roomId,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue