diff --git a/web/src/ui/RoomView.tsx b/web/src/ui/RoomView.tsx index 09e4c7a..436575e 100644 --- a/web/src/ui/RoomView.tsx +++ b/web/src/ui/RoomView.tsx @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . import { use, useRef } from "react" -import { getMediaURL } from "@/api/media.ts" +import { getAvatarURL } from "@/api/media.ts" import { RoomStateStore } from "@/api/statestore" import { EventID } from "@/api/types" import { useNonNullEventAsState } from "@/util/eventdispatcher.ts" @@ -31,12 +31,14 @@ interface RoomViewProps { const RoomHeader = ({ room, clearActiveRoom }: RoomViewProps) => { const roomMeta = useNonNullEventAsState(room.meta) + const avatarSourceID = roomMeta.lazy_load_summary?.heroes?.length === 1 + ? roomMeta.lazy_load_summary.heroes[0] : room.roomID return