Skip to content

Commit

Permalink
Rename to be obvious: joined_rooms -> joined_room_ids (#17203)
Browse files Browse the repository at this point in the history
Split out from #17167
  • Loading branch information
MadLittleMods authored May 16, 2024
1 parent 28a948f commit 52a6495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/17203.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename to be obvious: `joined_rooms` -> `joined_room_ids`.
4 changes: 2 additions & 2 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ async def _generate_sync_entry_for_device_list(

users_that_have_changed = set()

joined_rooms = sync_result_builder.joined_room_ids
joined_room_ids = sync_result_builder.joined_room_ids

# Step 1a, check for changes in devices of users we share a room
# with
Expand Down Expand Up @@ -1909,7 +1909,7 @@ async def _generate_sync_entry_for_device_list(
# Remove any users that we still share a room with.
left_users_rooms = await self.store.get_rooms_for_users(newly_left_users)
for user_id, entries in left_users_rooms.items():
if any(rid in joined_rooms for rid in entries):
if any(rid in joined_room_ids for rid in entries):
newly_left_users.discard(user_id)

return DeviceListUpdates(changed=users_that_have_changed, left=newly_left_users)
Expand Down

0 comments on commit 52a6495

Please sign in to comment.