diff options
author | Erik Johnston <erik@matrix.org> | 2015-10-02 10:41:14 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-10-02 10:41:14 +0100 |
commit | a38d36ccd0cb6b19a0d4b9a591ce990f736bdabc (patch) | |
tree | 4458974456c631386c7acd699b15a9f51779f0b2 /synapse/handlers/room.py | |
parent | Merge pull request #283 from matrix-org/erikj/atomic_join_federation (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/unfederatable (diff) | |
download | synapse-a38d36ccd0cb6b19a0d4b9a591ce990f736bdabc.tar.xz |
Merge pull request #279 from matrix-org/erikj/unfederatable
Add flag which disables federation of the room
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index b677955523..ac636255c2 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -149,12 +149,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, room_alias=room_alias, ) @@ -203,7 +206,8 @@ class RoomCreationHandler(BaseHandler): defer.returnValue(result) def _create_events_for_new_room(self, creator, room_id, preset_config, - invite_list, initial_state, room_alias): + invite_list, initial_state, creation_content, + room_alias): config = RoomCreationHandler.PRESETS_DICT[preset_config] creator_id = creator.to_string() @@ -225,9 +229,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( |