summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2016-02-15 18:13:10 +0000
committerDaniel Wagner-Hall <daniel@matrix.org>2016-02-15 18:18:39 +0000
commite560045cfd73e2dbfa6a272fc298dab820e6e943 (patch)
tree4cbe082952887504804e0779b7554e07230d8a5f /synapse/rest/client
parentRevert "Merge two of the room join codepaths" (diff)
downloadsynapse-e560045cfd73e2dbfa6a272fc298dab820e6e943.tar.xz
Simplify room creation code
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v1/room.py18
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: