mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
fixup! web/timeline: render MSC4144 per-message profiles
Signed-off-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
97a723e163
commit
67b3d550d6
1 changed files with 1 additions and 1 deletions
|
@ -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)}`
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue