From 99d1c3411d4667e793ae325d93fc9cf95f5415f6 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 21 Dec 2021 08:19:11 -0500 Subject: [PATCH] Do not attempt to bundled aggregations for state events. --- changelog.d/11623.bugfix | 1 + synapse/handlers/message.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 changelog.d/11623.bugfix diff --git a/changelog.d/11623.bugfix b/changelog.d/11623.bugfix new file mode 100644 index 000000000000..4116e5dd7c7b --- /dev/null +++ b/changelog.d/11623.bugfix @@ -0,0 +1 @@ +Fix a long-standing bug where responses included bundled aggregations when they should not, per [MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675). diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 1a7190085a7d..5e3d3886eb1d 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -246,9 +246,7 @@ async def get_state_events( room_state = room_state_events[membership_event_id] now = self.clock.time_msec() - events = await self._event_serializer.serialize_events( - room_state.values(), now, bundle_aggregations=True - ) + events = await self._event_serializer.serialize_events(room_state.values(), now) return events async def get_joined_members(self, requester: Requester, room_id: str) -> dict: