Fix /room/.../event/... to return the *original* event after any edits (#12476)

This is what the MSC (now) requires. Fixes https://github.com/matrix-org/synapse/issues/10310.
This commit is contained in:
Richard van der Hoff 2022-04-19 16:42:19 +01:00 committed by GitHub
parent 798deb3a10
commit b80bb7e452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 79 additions and 39 deletions

View file

@ -669,8 +669,10 @@ class RoomEventServlet(RestServlet):
)
time_now = self.clock.time_msec()
# per MSC2676, /rooms/{roomId}/event/{eventId}, should return the
# *original* event, rather than the edited version
event_dict = self._event_serializer.serialize_event(
event, time_now, bundle_aggregations=aggregations
event, time_now, bundle_aggregations=aggregations, apply_edits=False
)
return 200, event_dict