Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user pill shows current avatar/displayname instead of what it was at the time the message was sent #4677

Open
uhoreg opened this issue Jul 25, 2017 · 9 comments
Labels
A-Pills O-Occasional Affects or can be seen by some users regularly or most users rarely T-Defect T-Enhancement

Comments

@uhoreg
Copy link
Member

uhoreg commented Jul 25, 2017

e.g., when I went into #dendrite-dev today, I saw:
image

because hfinch changed their displayname to Finch and set their avatar later on. It looks a bit confusing since Kegan is talking to Finch with a blue avatar, and hfinch with an orange avatar is responding. I would expect the pill to show the displayname and avatar from the time that the message was sent, rather than their current values.

Version information

  • Platform: web

For the web app:

  • Browser: Chromium
  • OS: Debian
  • URL: riot.im/develop (ec6efd2-react-d7f4e7c8c089-js-d8f486fc0d06)
@lukebarnard1
Copy link
Contributor

lukebarnard1 commented Jul 25, 2017

FTR a quick roll-over currently lets you know who Finch is. But we could go and find the member event prior to the mention in the timeline and use the avatar/displayname there instead of the using the current avatar/displayname.

@lampholder
Copy link
Member

Flagging P1 just to highlight the urgency with which we should think about this (we might decide that we're not going to change this behaviour now, but it does require a decision).

@lukebarnard1 - how invasive and labour-intensive is the approach you mention above?

@lukebarnard1
Copy link
Contributor

how invasive and labour-intensive is the approach you mention above?

Well the naive implementation would take the previous member event in the client's timeline when pillifying. It would have to fall back on the current one if said event hasn't been paginated in?

@uhoreg
Copy link
Member Author

uhoreg commented Aug 9, 2017

Surely the necessary information must be available somewhere, since it's already displayed in the timeline.

@lukebarnard1
Copy link
Contributor

The current member information is available. I'm not sure if we strictly have access to historical member events.

@krombel
Copy link
Contributor

krombel commented Aug 29, 2017

The user name at the point of writing the message can as well be optained by the message itself.
The pill creates following formatted_body:

"formatted_body": "<a href=\"https://matrix.to/#/@userid:domain.tld\">displayname</a>: message",

So "displayname" gets defined on message send and can therefore be used to get the displayname of that point in time.

@t3chguy
Copy link
Member

t3chguy commented Aug 29, 2017

fwiw, no point doing this since the avatar and displayname left/above of the event already has historical state, so something is obviously tracking this on a event by event basis
your soln would offer only a quick hacky fix for displaynames but nothing for avatars

@lukebarnard1
Copy link
Contributor

So "displayname" gets defined on message send and can therefore be used to get the displayname of that point in time.

We want to avoid the abuse vector here as much as possible (i.e. a sender who sends something other than the user's current displayname). The easiest way to do this is to replace it entirely with something we can trust.

something is obviously tracking this on a event by event basis

Indeed, we just need the last event sent by the user before the mention.

@turt2live
Copy link
Member

if someone heads out to fix this, note that there's a labs flag which wants this behaviour: matrix-org/matrix-react-sdk#7815

@SimonBrandner SimonBrandner added O-Occasional Affects or can be seen by some users regularly or most users rarely and removed P1 labels Feb 16, 2022
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Feb 18, 2022
* Add labs flag: Show only current profile on historical messages

For element-hq/element-web#3768
Related element-hq/element-web#4677

* Use the member's user ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Pills O-Occasional Affects or can be seen by some users regularly or most users rarely T-Defect T-Enhancement
Projects
None yet
Development

No branches or pull requests

9 participants