-
-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Link to problem area:
https://spec.matrix.org/v1.4/client-server-api/#event-replacements
Issue
https://spec.matrix.org/v1.4/client-server-api/#editing-encrypted-events says:
[for encrypted events],
m.new_content
is placed in the content of the encrypted payload.
We then have https://spec.matrix.org/v1.4/client-server-api/#server-side-replacement-of-content, which says:
Whenever an
m.replace
is to be bundled with an event as above, the server should also modify the content of the original event according to them.new_content
of the most recent replacement event.
Of course, the server doesn't have access to m.new_content
, so that would suggest replacing the original content with... nothing?
Arguably, Synapse shouldn't even consider the edit as valid, because https://spec.matrix.org/v1.4/client-server-api/#validity-of-replacement-events says:
The replacement event (once decrypted, if appropriate) must have an
m.new_content
property.
However, it's important that edits to encrypted events do get aggregated into the original event, so it's not as simple as just excluding them.
See also matrix-org/synapse#14252 (comment).