element-hq / element-hq/element-web
Message and pill from historical profile not highlighted
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
1. Have someone mention your user with a pill
1. Change your display name to something unrelated like `flyingbutterfly`
1. Have someone mention your user with a pill (the pill should be your new display name now)
1. Change your display name back to your original name
1. Refresh the page, maybe a couple of times
1. Notice how the message and pill from when your display name was different isn't highlighted red anymore
### Outcome
#### What did you expect?
Pills for all historical profiles of me are highlighted.
#### What happened instead?
The screenshot is from the perspective of `erictroupetester` user who changed their name to `flyingbutterfly`. After the refresh, all of the pills also show `erictroupetester` instead of the historical profile at the time (this is tracked by https://github.com/vector-im/element-web/issues/4677) (I don't have the [`feature_use_only_current_profiles` Lab](https://github.com/matrix-org/matrix-react-sdk/pull/7815) enabled)

Problem message source for reference:
```json
{
"type": "m.room.message",
"room_id": "!HBehERstyQBxyJDLfR:my.synapse.server",
"sender": "@ericgittertester:my.synapse.server",
"content": {
"org.matrix.msc1767.message": [
{
"body": "flyingbutterfly: direct pill mention",
"mimetype": "text/plain"
},
{
"body": "flyingbutterfly: direct pill mention",
"mimetype": "text/html"
}
],
"body": "flyingbutterfly: direct pill mention",
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": "flyingbutterfly: direct pill mention"
},
"origin_server_ts": 1649964056179,
"unsigned": {
"age": 5834917
},
"event_id": "$zTz0pkbepiOiTWOl1xrgEJGu99okiFtZ5_My1jFIsuc",
"user_id": "@ericgittertester:my.synapse.server",
"age": 5834917
}
```
### Operating system
macOS 12.3
### Browser information
Chrome version 100.0.4896.75
### URL for webapp
http://localhost:8080/
### Application version
Latest `develop` from 2022-04-13
### Homeserver
localhost
### Will you send logs?
No
Contributor guide
Assessment
This issue has not been assessed yet.