element-hq / element-hq/compound

If the Display Name starts with @ the placeholder avatar will render the next character

Open
#223 0 comments 0 reactions 0 assignees View on GitHub
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:
Screenshot 2023-08-31 at 12 30 20

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.