SUMMARY Sent message can be edited without issue one time, either using s/g replacement or the edit button on the message. However, editing the message a second time fails with both methods. The s/g replacement for the second edit simply shows no change. Using the edit button for the second edit does not display original text to edit (although adding a new message in place of the original seems to be allowed). When using the s/g replacement method exclusively, the second failed edit attempt will cause the message to disappear for the user on other clients (Element). The recipient will receive the first edit. STEPS TO REPRODUCE 1. Send a message 2. Edit the message 3. Edit the message again (particularly with s/g) 4. Try to edit the message again OBSERVED RESULT Depending upon the number of edit attempts, subsequent edits are either simply not applied, or the message disappears for the sender on other Matrix clients (Element). The recipient only receives the first edit. EXPECTED RESULT One expects all subsequent edits to work as the first. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Gentoo KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.3 ADDITIONAL INFORMATION
So editing using the hover button should always work, this is because the issue is the way in which Matrix handles edits. They're actually their own events, they just get hidden by Neochat. If you want to check this for yourself switch on dev tools and click on show hidden events. You'll see that what you second s/ edit is doing is editing the replacement event because Neochat is not properly ignoring it when figuring out the event to edit.
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/2009
Git commit cee9058c77957e0cf61d30b55ee179fbd37752a4 by Carl Schwan, on behalf of James Graham. Committed on 18/11/2024 at 08:41. Pushed by carlschwan into branch 'master'. Fix Sed Edits Make sure that for multiple sed edits we grab the eventID of the original message not the replacement M +7 -2 src/models/actionsmodel.cpp https://invent.kde.org/network/neochat/-/commit/cee9058c77957e0cf61d30b55ee179fbd37752a4
(In reply to James Graham from comment #1) > So editing using the hover button should always work, this is because the > issue is the way in which Matrix handles edits. They're actually their own > events, they just get hidden by Neochat. Perhaps it is the UI that is failing here using the hover button, rather than how Neochat is actually handling the edit. On the second edit just using the hover button, the original text is not displayed in the edit, just the "check" and "x" buttons.
*** Bug 498016 has been marked as a duplicate of this bug. ***