Skip to content

Commit

Permalink
Move prev_room_sync_config up
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods authored and erikjohnston committed Oct 10, 2024
1 parent 6391b0f commit f8feef5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions synapse/handlers/sliding_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,8 @@ async def get_room_sync_data(

state_reset_out_of_room = True

prev_room_sync_config = previous_connection_state.room_configs.get(room_id)

# Determine whether we should limit the timeline to the token range.
#
# We should return historical messages (before token range) in the
Expand Down Expand Up @@ -561,7 +563,6 @@ async def get_room_sync_data(

log_kv({"sliding_sync.room_status": room_status})

prev_room_sync_config = previous_connection_state.room_configs.get(room_id)
if prev_room_sync_config is not None:
# Check if the timeline limit has increased, if so ignore the
# timeline bound and record the change (see "XXX: Odd behavior"
Expand Down Expand Up @@ -1103,8 +1104,6 @@ async def get_room_sync_data(
# sensible order again.
bump_stamp = 0

prev_room_sync_config = previous_connection_state.room_configs.get(room_id)

room_sync_required_state_map_to_persist = room_sync_config.required_state_map
if changed_required_state_map:
room_sync_required_state_map_to_persist = changed_required_state_map
Expand Down

0 comments on commit f8feef5

Please sign in to comment.