Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Apply & bundle edits for non-message events. #14034

Merged
merged 5 commits into from
Oct 7, 2022
Merged

Conversation

clokep
Copy link
Member

@clokep clokep commented Oct 3, 2022

Currently Synapse only fetches edits for m.room.message events, this is not correct according to the specification. It should apply for all types of events.

This manifest in two related bugs (see below):

  • No edit information is bundled for events which aren't m.room.message.
  • m.new_content is not applied where available.

Due to the structure of our code both of these have the same room cause, which is simply that we enforce that the event type must be m.room.message when fetching edits from the database. We relax that in this PR.

Note that I didn't modify any tests since the current tests send m.room.message events, which is still valid.

Fixes #12793, fixes #12503

@clokep clokep marked this pull request as ready for review October 5, 2022 14:01
@clokep clokep requested a review from a team as a code owner October 5, 2022 14:01
synapse/storage/databases/main/relations.py Outdated Show resolved Hide resolved
@clokep clokep enabled auto-merge (squash) October 7, 2022 14:45
@clokep clokep merged commit ab8047b into develop Oct 7, 2022
@clokep clokep deleted the clokep/replace-any branch October 7, 2022 15:27
clokep added a commit that referenced this pull request Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants