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

Commit c4bf48e

Browse files
MadLittleModsreivilibre
authored andcommitted
Fix event context for outliers in important MSC2716 spot (#10938)
Fix event context for outlier causing failures in all of the MSC2716 Complement tests. The `EventContext.for_outlier` refactor happened in #10883 and this spot was left out.
1 parent a03ed5e commit c4bf48e

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

changelog.d/10938.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug introduced in Synapse 1.44 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint to return a 500 error.

synapse/handlers/message.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -952,18 +952,13 @@ async def create_new_client_event(
952952
depth=depth,
953953
)
954954

955-
old_state = None
956-
957955
# Pass on the outlier property from the builder to the event
958956
# after it is created
959957
if builder.internal_metadata.outlier:
960-
event.internal_metadata.outlier = builder.internal_metadata.outlier
961-
962-
# Calculate the state for outliers that pass in their own `auth_event_ids`
963-
if auth_event_ids:
964-
old_state = await self.store.get_events_as_list(auth_event_ids)
965-
966-
context = await self.state.compute_event_context(event, old_state=old_state)
958+
event.internal_metadata.outlier = True
959+
context = EventContext.for_outlier()
960+
else:
961+
context = await self.state.compute_event_context(event)
967962

968963
if requester:
969964
context.app_service = requester.app_service

0 commit comments

Comments
 (0)