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:19:01 +0000
commit1a2197d7bf62437208643f750ee757b8b85e2db6 (patch)
tree2e85eed4bcae46936b58e15b738be0d07a1f20ad /synapse/rest/client
parentUse update_membership for profile updates (diff)
downloadsynapse-1a2197d7bf62437208643f750ee757b8b85e2db6.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 f8cd746a88..5f5c26a91c 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: