When clicking a user's display name ("DN") in chat history, the DN is inserted in the composer to mention them. If the DN changed after the post you want to mention them from, the old DN is inserted regardless. This breaks the mention function, unless a client keeps a list of all former DNs - which riot does not.
Instead, I'd expect riot to either
This is a tricky one - all potential behaviours could be a little bit jarring, but I think you're right - the intended behaviour is to mention somebody, so perhaps fetching and inserting the user's current DN might be the least obstructive.
The real solution to this is #2980
So clicking the user's name would insert a pill into the composer with their current avatar and display name?
Yep, and there's a plan to insert the user's most recent display name when the pill gets rendered in the timeline
This seems solved in the current version via #2980.
Most helpful comment
The real solution to this is #2980