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

Commit

Permalink
Fix get_users_in_room mis-use in transfer_room_state_on_room_upgrade
Browse files Browse the repository at this point in the history
Spawning from looking into `get_users_in_room` while investigating
#13942 (comment).

See #13575 (comment)
for the original exploration around finding `get_users_in_room` mis-uses.
  • Loading branch information
MadLittleMods committed Sep 29, 2022
1 parent 6f0c3e6 commit 3b7f1df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/handlers/room_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,8 +1150,8 @@ async def transfer_room_state_on_room_upgrade(
logger.info("Transferring room state from %s to %s", old_room_id, room_id)

# Find all local users that were in the old room and copy over each user's state
users = await self.store.get_users_in_room(old_room_id)
await self.copy_user_state_on_room_upgrade(old_room_id, room_id, users)
local_users = await self.store.get_local_users_in_room(old_room_id)
await self.copy_user_state_on_room_upgrade(old_room_id, room_id, local_users)

# Add new room to the room directory if the old room was there
# Remove old room from the room directory
Expand Down

0 comments on commit 3b7f1df

Please sign in to comment.