fixup! web/timeline: render MSC4144 per-message profiles

Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
Sumner Evans 2025-01-03 08:34:47 -07:00
parent a660fbd2eb
commit 97a723e163
No known key found for this signature in database

View file

@ -83,6 +83,7 @@ export const getAvatarURL = (userID: UserID, content?: UserProfile | null): stri
const backgroundColor = getUserColor(userID)
let server: string | undefined
let mediaID: string | undefined
const encrypted = !!content?.avatar_file
if (content?.avatar_file) {
[server, mediaID] = parseMXC(content.avatar_file.url)
} else {
@ -92,7 +93,7 @@ export const getAvatarURL = (userID: UserID, content?: UserProfile | null): stri
return makeFallbackAvatar(backgroundColor, fallbackCharacter)
}
const fallback = `${backgroundColor}:${fallbackCharacter}`
return `_gomuks/media/${server}/${mediaID}?encrypted=false&fallback=${encodeURIComponent(fallback)}`
return `_gomuks/media/${server}/${mediaID}?encrypted=${encrypted}&fallback=${encodeURIComponent(fallback)}`
}
interface RoomForAvatarURL {