mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 03:20:52 +00:00
SYN-153: Raise 404 if room alias is not found
This commit is contained in:
parent
ff23e5ba37
commit
8993affdc0
1 changed files with 8 additions and 4 deletions
|
@ -122,10 +122,14 @@ class DirectoryHandler(BaseHandler):
|
||||||
room_alias
|
room_alias
|
||||||
)
|
)
|
||||||
|
|
||||||
defer.returnValue({
|
if result is not None:
|
||||||
"room_id": result.room_id,
|
defer.returnValue({
|
||||||
"servers": result.servers,
|
"room_id": result.room_id,
|
||||||
})
|
"servers": result.servers,
|
||||||
|
})
|
||||||
|
else:
|
||||||
|
raise SynapseError(404, "Room alias \"%s\" not found", room_alias)
|
||||||
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def send_room_alias_update_event(self, user_id, room_id):
|
def send_room_alias_update_event(self, user_id, room_id):
|
||||||
|
|
Loading…
Reference in a new issue