From b80bb7e4526bd0425b3cdd10fa5633a5a4b4e05f Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:42:19 +0100 Subject: 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. --- synapse/rest/client/room.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'synapse/rest') diff --git a/synapse/rest/client/room.py b/synapse/rest/client/room.py index 47e152c8cc..937c323176 100644 --- a/synapse/rest/client/room.py +++ b/synapse/rest/client/room.py @@ -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 -- cgit 1.5.1