0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 16:33:53 +01:00

SYN-153: Raise 404 if room alias is not found

This commit is contained in:
Mark Haines 2014-11-19 17:14:14 +00:00
parent ff23e5ba37
commit 8993affdc0

View file

@ -122,10 +122,14 @@ class DirectoryHandler(BaseHandler):
room_alias
)
defer.returnValue({
"room_id": result.room_id,
"servers": result.servers,
})
if result is not None:
defer.returnValue({
"room_id": result.room_id,
"servers": result.servers,
})
else:
raise SynapseError(404, "Room alias \"%s\" not found", room_alias)
@defer.inlineCallbacks
def send_room_alias_update_event(self, user_id, room_id):