diff options
author | Daniel Wagner-Hall <daniel@matrix.org> | 2016-02-15 18:13:10 +0000 |
---|---|---|
committer | Daniel Wagner-Hall <daniel@matrix.org> | 2016-02-15 18:18:39 +0000 |
commit | e560045cfd73e2dbfa6a272fc298dab820e6e943 (patch) | |
tree | 4cbe082952887504804e0779b7554e07230d8a5f /synapse/rest | |
parent | Revert "Merge two of the room join codepaths" (diff) | |
download | synapse-e560045cfd73e2dbfa6a272fc298dab820e6e943.tar.xz |
Simplify room creation code
Diffstat (limited to 'synapse/rest')
-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: |