diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-02-16 11:21:06 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2016-02-16 11:21:06 +0000 |
commit | a182e5d7210af76df8b9db078164d98bb28948be (patch) | |
tree | 4cbe082952887504804e0779b7554e07230d8a5f /synapse/rest/client/v1/room.py | |
parent | Revert "Merge two of the room join codepaths" (diff) | |
parent | Simplify room creation code (diff) | |
download | synapse-a182e5d7210af76df8b9db078164d98bb28948be.tar.xz |
Merge pull request #577 from matrix-org/daniel/createroom
Simplify room creation code
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 81bfe377bd..d3c1b359a2 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -63,24 +63,12 @@ class RoomCreateRestServlet(ClientV1RestServlet): def on_POST(self, request): requester = yield self.auth.get_user_by_req(request) - room_config = self.get_room_config(request) - info = yield self.make_room( - room_config, - requester.user, - None, - ) - room_config.update(info) - defer.returnValue((200, info)) - - @defer.inlineCallbacks - def make_room(self, room_config, auth_user, room_id): handler = self.handlers.room_creation_handler info = yield handler.create_room( - user_id=auth_user.to_string(), - room_id=room_id, - config=room_config + requester, self.get_room_config(request) ) - defer.returnValue(info) + + defer.returnValue((200, info)) def get_room_config(self, request): try: |