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

Commit

Permalink
Mark retransmitted rooms as newly_joined
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Jan 20, 2023
1 parent c258e72 commit 0bd54de
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ async def _get_room_changes_for_incremental_sync(
for event in membership_change_events:
mem_change_events_by_room_id.setdefault(event.room_id, []).append(event)

newly_joined_rooms: List[str] = []
newly_joined_rooms: List[str] = list(sync_result_builder.retransmit_room_ids)
newly_left_rooms: List[str] = []
room_entries: List[RoomSyncResultBuilder] = []
invited: List[InvitedSyncResult] = []
Expand All @@ -2004,9 +2004,7 @@ async def _get_room_changes_for_incremental_sync(
# we do send down the room, and with full state, where necessary

old_state_ids = None
if room_id in sync_result_builder.joined_room_ids and (
non_joins or room_id in sync_result_builder.retransmit_room_ids
):
if room_id in sync_result_builder.joined_room_ids and non_joins:
# Always include if the user (re)joined the room, especially
# important so that device list changes are calculated correctly.
# If there are non-join member events, but we are still in the room,
Expand Down

0 comments on commit 0bd54de

Please sign in to comment.