Split out sending the room alias events from creating the alias so that we can do them in the right point when creating a room

This commit is contained in:
Mark Haines 2014-11-18 15:03:01 +00:00
parent c571dd4f0e
commit a5b88c489e
4 changed files with 31 additions and 27 deletions

View file

@ -70,9 +70,11 @@ class ClientDirectoryServer(RestServlet):
dir_handler = self.handlers.directory_handler
try:
user_id = user.to_string()
yield dir_handler.create_association(
user.to_string(), room_alias, room_id, servers
user_id, room_alias, room_id, servers
)
yield dir_handler.send_room_alias_update_event(user_id, room_id)
except SynapseError as e:
raise e
except: