fix: Error uploading fallback avatar when name contains characters that need to be escaped (#2387)
* Todo -> Task to match new langauge elsewhere * fix: Correctly escape characters in Tiley url * Move encoding to avatars logic, add test
This commit is contained in:
@ -29,6 +29,8 @@ export async function generateAvatarUrl({
|
||||
}
|
||||
}
|
||||
|
||||
const tileyUrl = `${DEFAULT_AVATAR_HOST}/avatar/${hashedId}/${name[0]}.png`;
|
||||
const tileyUrl = `${DEFAULT_AVATAR_HOST}/avatar/${hashedId}/${encodeURIComponent(
|
||||
name[0]
|
||||
)}.png`;
|
||||
return cbUrl && cbResponse && cbResponse.status === 200 ? cbUrl : tileyUrl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user