summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-10-12 12:05:18 +0100
committerRichard van der Hoff <richard@matrix.org>2018-10-25 19:10:24 +0100
commit1b9f253e208ea3a471594bde52366e3abf54fc1a (patch)
tree2df4a3df7f9b61995879416e58ddd6cf70751fcc /synapse/handlers/room.py
parentpreserve room visibility (diff)
downloadsynapse-1b9f253e208ea3a471594bde52366e3abf54fc1a.tar.xz
preserve PLs
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 2f9eb8ef4c..40ca12f1b7 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -179,7 +179,13 @@ class RoomCreationHandler(BaseHandler):
             }
         }
 
-        initial_state = OrderedDict()
+        initial_state = dict()
+
+        old_room_state_ids = yield self.store.get_current_state_ids(old_room_id)
+        pl_event_id = old_room_state_ids.get((EventTypes.PowerLevels, ""))
+        if pl_event_id:
+            pl_event = yield self.store.get_event(pl_event_id)
+            initial_state[(EventTypes.PowerLevels, "")] = pl_event.content
 
         yield self._send_events_for_new_room(
             requester,