summary refs log tree commit diff
path: root/synapse/handlers/room_batch.py
diff options
context:
space:
mode:
authorH. Shay <hillerys@element.io>2023-03-06 12:48:59 -0800
committerH. Shay <hillerys@element.io>2023-03-06 12:48:59 -0800
commit7fc487421f19d8841c36481701655bc31bfcd79f (patch)
treee5c4e634fa957a561675156c868c561c36a71d66 /synapse/handlers/room_batch.py
parentadd clearer return values (diff)
parentPass the requester during event serialization. (#15174) (diff)
downloadsynapse-7fc487421f19d8841c36481701655bc31bfcd79f.tar.xz
Merge branch 'develop' into shay/rework_module
Diffstat (limited to 'synapse/handlers/room_batch.py')
-rw-r--r--synapse/handlers/room_batch.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/room_batch.py b/synapse/handlers/room_batch.py

index 3d432ac295..8b5e02af17 100644 --- a/synapse/handlers/room_batch.py +++ b/synapse/handlers/room_batch.py
@@ -327,7 +327,11 @@ class RoomBatchHandler: # Mark all events as historical event_dict["content"][EventContentFields.MSC2716_HISTORICAL] = True - event, context, _ = await self.event_creation_handler.create_event( + ( + event, + unpersisted_context, + _, + ) = await self.event_creation_handler.create_event( await self.create_requester_for_user_id_from_app_service( ev["sender"], app_service_requester.app_service ), @@ -345,7 +349,7 @@ class RoomBatchHandler: historical=True, depth=inherited_depth, ) - + context = await unpersisted_context.persist(event) assert context._state_group # Normally this is done when persisting the event but we have to @@ -374,7 +378,7 @@ class RoomBatchHandler: # correct stream_ordering as they are backfilled (which decrements). # Events are sorted by (topological_ordering, stream_ordering) # where topological_ordering is just depth. - for (event, context) in reversed(events_to_persist): + for event, context in reversed(events_to_persist): # This call can't raise `PartialStateConflictError` since we forbid # use of the historical batch API during partial state await self.event_creation_handler.handle_new_client_event(