diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-01-31 20:28:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-31 20:28:37 +0000 |
commit | c45fd0dda0e8048093d186fe5fad01a764bbd1a4 (patch) | |
tree | 40080614f4a652d5aaa2761c292746244ae13e34 /synapse/handlers | |
parent | Merge branch 'release-v0.99.0' into develop (diff) | |
parent | Raise an exception instead of returning None (diff) | |
download | synapse-c45fd0dda0e8048093d186fe5fad01a764bbd1a4.tar.xz |
Merge pull request #4530 from matrix-org/anoa/room_upgrade_federatable
Copy over non-federatable trait on room upgrade
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/room.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 13ba9291b0..5e40e9ea46 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -263,6 +263,16 @@ class RoomCreationHandler(BaseHandler): } } + # Check if old room was non-federatable + + # Get old room's create event + old_room_create_event = yield self.store.get_create_event_for_room(old_room_id) + + # Check if the create event specified a non-federatable room + if not old_room_create_event.content.get("m.federate", True): + # If so, mark the new room as non-federatable as well + creation_content["m.federate"] = False + initial_state = dict() # Replicate relevant room events |