mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
SYN-148: Add the alias after creating the room
This commit is contained in:
parent
1b91c26409
commit
cf45e57d9c
1 changed files with 9 additions and 9 deletions
|
@ -111,15 +111,6 @@ class RoomCreationHandler(BaseHandler):
|
|||
user, room_id, is_public=is_public
|
||||
)
|
||||
|
||||
if room_alias:
|
||||
directory_handler = self.hs.get_handlers().directory_handler
|
||||
yield directory_handler.create_association(
|
||||
user_id=user_id,
|
||||
room_id=room_id,
|
||||
room_alias=room_alias,
|
||||
servers=[self.hs.hostname],
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def handle_event(event):
|
||||
snapshot = yield self.store.snapshot_room(event)
|
||||
|
@ -184,9 +175,18 @@ class RoomCreationHandler(BaseHandler):
|
|||
join_event,
|
||||
do_auth=False
|
||||
)
|
||||
|
||||
result = {"room_id": room_id}
|
||||
|
||||
if room_alias:
|
||||
result["room_alias"] = room_alias.to_string()
|
||||
directory_handler = self.hs.get_handlers().directory_handler
|
||||
yield directory_handler.create_association(
|
||||
user_id=user_id,
|
||||
room_id=room_id,
|
||||
room_alias=room_alias,
|
||||
servers=[self.hs.hostname],
|
||||
)
|
||||
|
||||
defer.returnValue(result)
|
||||
|
||||
|
|
Loading…
Reference in a new issue