summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-11-07 11:12:22 +0000
committerGitHub <noreply@github.com>2019-11-07 11:12:22 +0000
commite914cf12f65c1bb980a023941eb50599c4aa063c (patch)
treedf11fe13a12a5cd32c4ca779f9db655ce64bbba0 /synapse/handlers
parenttweak changelog (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into anoa/room_upgrad... (diff)
downloadsynapse-e914cf12f65c1bb980a023941eb50599c4aa063c.tar.xz
Merge pull request #6235 from matrix-org/anoa/room_upgrade_groups
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room_member.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py

index 06d09c2947..6cfee4b361 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py
@@ -515,6 +515,15 @@ class RoomMemberHandler(object): yield self.store.set_room_is_public(old_room_id, False) yield self.store.set_room_is_public(room_id, True) + # Check if any groups we own contain the predecessor room + local_group_ids = yield self.store.get_local_groups_for_room(old_room_id) + for group_id in local_group_ids: + # Add new the new room to those groups + yield self.store.add_room_to_group(group_id, room_id, old_room["is_public"]) + + # Remove the old room from those groups + yield self.store.remove_room_from_group(group_id, old_room_id) + @defer.inlineCallbacks def copy_user_state_on_room_upgrade(self, old_room_id, new_room_id, user_ids): """Copy user-specific information when they join a new room when that new room is the