element-hq / element-hq/compound
If the Display Name starts with @ the placeholder avatar will render the next character
- Dominant language
- MDX
- Stars
- 24
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
1. Set your display name to be something like "@test"
2. Check your avatar
3. Instead of displaying @ it will display T
I think the issue is related on this piece of code here:
https://github.com/vector-im/compound-web/blob/5dda11aa9733462fb8422968181275bc3e9b35e3/src/utils/string.ts#L50C1-L50C1
Where the trimming is happening for all the prefixes used in the Matrix protocol, which would be alright if the display name is missing and the input parameter is the userID/roomID, however in case of a display name the first character should be used regardless.
Here is a screenshot of the issue:
Tested on develop.element.io but it probably also affects the latest release.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.