summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-09-01 15:09:23 +0100
committerErik Johnston <erik@matrix.org>2015-09-01 15:47:30 +0100
commita88e16152f00719df152eaef31dcfd457c019293 (patch)
tree40dd70d96415463dbd6dff296e390aebd0034fc1 /synapse/handlers/room.py
parentMerge pull request #264 from matrix-org/markjh/syweb_on_pypi (diff)
downloadsynapse-a88e16152f00719df152eaef31dcfd457c019293.tar.xz
Add flag which disables federation of the room
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index c5d1001b50..4f8ad824b5 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -150,12 +150,15 @@ class RoomCreationHandler(BaseHandler):
         for val in raw_initial_state:
             initial_state[(val["type"], val.get("state_key", ""))] = val["content"]
 
+        creation_content = config.get("creation_content", {})
+
         user = UserID.from_string(user_id)
         creation_events = self._create_events_for_new_room(
             user, room_id,
             preset_config=preset_config,
             invite_list=invite_list,
             initial_state=initial_state,
+            creation_content=creation_content,
         )
 
         msg_handler = self.hs.get_handlers().message_handler
@@ -203,7 +206,7 @@ class RoomCreationHandler(BaseHandler):
         defer.returnValue(result)
 
     def _create_events_for_new_room(self, creator, room_id, preset_config,
-                                    invite_list, initial_state):
+                                    invite_list, initial_state, creation_content):
         config = RoomCreationHandler.PRESETS_DICT[preset_config]
 
         creator_id = creator.to_string()
@@ -225,9 +228,10 @@ class RoomCreationHandler(BaseHandler):
 
             return e
 
+        creation_content.update({"creator": creator.to_string()})
         creation_event = create(
             etype=EventTypes.Create,
-            content={"creator": creator.to_string()},
+            content=creation_content,
         )
 
         join_event = create(