This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 3 files changed +4
-8
lines changed
3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change
1
+ Clean-up event persistence code.
Original file line number Diff line number Diff line change @@ -716,8 +716,6 @@ async def _persist_event_batch(
716
716
)
717
717
if not is_still_joined :
718
718
logger .info ("Server no longer in room %s" , room_id )
719
- latest_event_ids = set ()
720
- current_state = {}
721
719
delta .no_longer_in_room = True
722
720
723
721
state_delta_for_room [room_id ] = delta
Original file line number Diff line number Diff line change @@ -355,9 +355,9 @@ def _persist_events_txn(
355
355
txn : LoggingTransaction ,
356
356
* ,
357
357
events_and_contexts : List [Tuple [EventBase , EventContext ]],
358
- inhibit_local_membership_updates : bool = False ,
359
- state_delta_for_room : Optional [ Dict [str , DeltaState ]] = None ,
360
- new_forward_extremities : Optional [ Dict [str , Set [str ]]] = None ,
358
+ inhibit_local_membership_updates : bool ,
359
+ state_delta_for_room : Dict [str , DeltaState ],
360
+ new_forward_extremities : Dict [str , Set [str ]],
361
361
) -> None :
362
362
"""Insert some number of room events into the necessary database tables.
363
363
@@ -384,9 +384,6 @@ def _persist_events_txn(
384
384
PartialStateConflictError: if attempting to persist a partial state event in
385
385
a room that has been un-partial stated.
386
386
"""
387
- state_delta_for_room = state_delta_for_room or {}
388
- new_forward_extremities = new_forward_extremities or {}
389
-
390
387
all_events_and_contexts = events_and_contexts
391
388
392
389
min_stream_order = events_and_contexts [0 ][0 ].internal_metadata .stream_ordering
You can’t perform that action at this time.
0 commit comments