Nheko-Reborn / nheko

Desktop client for Matrix using Qt and C++20.
https://nheko-reborn.github.io/
GNU General Public License v3.0
1.89k stars 199 forks source link

When a user changes their display name, it's changed on all events #1777

Open geekosaur opened 1 month ago

geekosaur commented 1 month ago

Describe the bug

When a user changes their display name, it's changed on events before the change as well. This leads to things like the attached image. This leaves the "changed display name" event "dangling", as the only thing showing the old display name.

In the past, I think this has behaved inconsistently as well, but it seems to be pretty consistent in recent nightlies.

To Reproduce

You will need a second account for this, unless someone else is accommodating.

  1. Have someone (or an alternate account) send a message, then change their display name, then send another message.

What happened?

Both messages' display names will change, but the "display name changed" message will confusingly still show the old display name even though Nheko no longer displays any events associated with it.

Expected behavior

The display names on messages sent before the display name change should continue to use the old display name, such that the "display name changed" event provides a link between the events.

Screenshots

No response

Version

0.12.0-24c687d

Operating system

Linux

Installation method

Flatpak nightly repo or download

Qt version

No response

C++ compiler

No response

Desktop Environment

MATE with xmonad as window manager

Did you use profiles?

Relevant log output

No response

Backtrace

No response

geekosaur commented 1 month ago

Screenshot_2024-07-18_21-57-47

geekosaur commented 1 month ago

Come to think of it, the same applied to the avatar change.

deepbluev7 commented 1 month ago

In general that is intentional, but that the displayname change message is confusing in that case is a bug we just never bothered to fix so far.