Nheko-Reborn / nheko

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

Editing a message in a thread makes it a reply #1814

Open geekosaur opened 1 month ago

geekosaur commented 1 month ago

Describe the bug

If you edit a message while in thread view, a reply-to is added automatically. If you send it without closing the reply-to, you cannot edit the reply-to part away afterward: it will look like the reply-to is gone while editing, but the message will still be a reply in the UI afterward.

To Reproduce

  1. Edit a message while viewing a thread, either by up-arrow or right clicking it and selecting "Reply"
  2. Observe that the message being edited has a reply-to prefix with a close box
  3. If the message being edited already has the reply-to, click the close box and save the message
  4. Observe that the reply-to is still present

What happened?

No response

Expected behavior

Nheko should not default to replies, since that should be implicit in the fact that it's in a thread. (Granting that there is otherwise no way to make a message a reply otherwise, but how then is the person being replied to chosen?) Additionally, if a message is edited to not have a reply-to part, it should be saved as a normal message as happens when not in thread view.

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

Ubuntu 24.04 if it matters, but I think I also observed this behavior on 22.04.

Backtrace

No response

geekosaur commented 1 month ago

Interestingly, when I look at the re-sent message as forwarded via heisenbridge to an IRC channel, it appears to no longer be a reply (replies would have the reply-to user prepended). Checking in Element concurs, so this is apparently a UI bug instead of a Matrix functionality bug. —ETA: and exiting thread view also shows it to not be a reply any more, and re-entering thread view likewise won't show it as a reply any more.