Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Aug 30, 2024
1 parent bfd36c1 commit ed4ce95
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions synapse/handlers/sliding_sync/room_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ async def _get_rewind_changes_to_current_membership_to_token(
# time of the `to_token`. In particular, we need to make these fixups:
#
# - a) Remove rooms that the user joined after the `to_token`
# - b) Add back rooms that the user left after the `to_token`
# - c) Update room membership events to the point in time of the `to_token`
# - b) Update room membership events to the point in time of the `to_token`

# Fetch membership changes that fall in the range from `to_token` up to
# `membership_snapshot_token`
Expand Down Expand Up @@ -645,16 +644,12 @@ async def get_room_membership_for_user_at_to_token(

# Our working list of rooms that can show up in the sync response
sync_room_id_set = {
# Note: The `room_for_user` we're assigning here will need to be fixed up
# (below) because they are potentially from the current snapshot time
# instead from the time of the `to_token`.
room_for_user.room_id: _RoomMembershipForUser(
room_id=room_for_user.room_id,
event_id=room_for_user.event_id,
event_pos=room_for_user.event_pos,
membership=room_for_user.membership,
sender=room_for_user.sender,
# We will update these fields below to be accurate
newly_joined=room_id in newly_joined_room_ids,
newly_left=room_id in newly_left_room_ids,
is_dm=room_id in dm_room_ids,
Expand All @@ -675,7 +670,6 @@ async def get_room_membership_for_user_at_to_token(
event_pos=left_event_pos,
membership=Membership.LEAVE,
sender=None,
# We will update these fields below to be accurate
newly_joined=False,
newly_left=True,
is_dm=room_id in dm_room_ids,
Expand Down

0 comments on commit ed4ce95

Please sign in to comment.