Open aaronraimist opened 4 years ago
The edited reply event has an issue with formatted_body
. It does not contain mx-reply
tags. It seems that message edition went wrong on the client side. We should determine from which client the edition has been done.
The behavior for editing a reply message will change. Wait for clarification of section What happens when we edit a reply?
of MSC 1849.
Edited replies emitted by EI get this right; EW get it wrong.
Edited replies emitted by EI get this right; EW get it wrong.
EI-edited replies show up as a duplicate of the reply's text on web, i'd argue that EI is the one that gets this wrong, as it mangles the reply fallback;
Editing a reply in EI sends <mx-reply><blockquote><a href="permalink">In reply to</a> <a href="mxid">sender</a><br/>Message being replied to</blockquote></mx-reply>Edited reply
, for both E2EE and plaintext rooms. Which is a valid fallback. I think the bug there is on EW for not stripping out the fallback on seeing that it's an (edited) reply.
Yeah. comparing the two - EW is sending the edit of the reply without a reply fallback in the new content (hence the original bug here). EI sends including the reply fallback, which then gets double-displayed by EW (which fails to strip the reply). So, there are two things that need to be done:
Interesting, I think I've seen an issue related to the first one on -web, but i'm not sure. (Though maybe it was related to reply fallbacks overall)
Yeah. comparing the two - EW is sending the edit of the reply without a reply fallback in the new content (hence the original bug here). EI sends including the reply fallback, which then gets double-displayed by EW (which fails to strip the reply). So, there are two things that need to be done:
- EW needs to strip the fallback when displaying
- Either EI needs to walk the relations to find the reply, or EW needs to be a better citizen and include a fallback. The latter is easier and will also help out other clients.
I'm currently looking at a bunch of things regarding replies and rich replies, and from what I see in MSC1849, there is definitely an issue in EI: we are currently providing the fallback formatted_body to both new_content and the "compatibility" body when we should only provide in the latter. EW rightly don't strip the fallback when using new_content as it's not supposed to be there.
For the former issue described here, this is indeed something I can reproduce systematically on EW alone, it happens any time someone edits a reply multiple times. At some point the fallback is simply not provided anymore in the "compatibility" body. While still an issue, this will be less noticeable the further we go on rich replies implementation.
This message from Michael just shows up as a normal message but it is actually a reply to another message. https://matrix.to/#/!mjbDjyNsRXndKLkHIe%3Amatrix.org/%24n2RTKvjGWKL5QPqp8npnmTZaNQ1FZjrWdLuVDHU1PiQ