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:35:04 -07:00
parent 97a723e163
commit 67b3d550d6
No known key found for this signature in database

View file

@ -83,7 +83,6 @@ 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,6 +91,7 @@ export const getAvatarURL = (userID: UserID, content?: UserProfile | null): stri
if (!mediaID) {
return makeFallbackAvatar(backgroundColor, fallbackCharacter)
}
const encrypted = !!content?.avatar_file
const fallback = `${backgroundColor}:${fallbackCharacter}`
return `_gomuks/media/${server}/${mediaID}?encrypted=${encrypted}&fallback=${encodeURIComponent(fallback)}`
}