mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-03-03 07:39:14 -05:00
SYN-153: Raise 404 if room alias is not found
This commit is contained in:
parent
ff23e5ba37
commit
8993affdc0
@ -122,10 +122,14 @@ class DirectoryHandler(BaseHandler):
|
|||||||
room_alias
|
room_alias
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if result is not None:
|
||||||
defer.returnValue({
|
defer.returnValue({
|
||||||
"room_id": result.room_id,
|
"room_id": result.room_id,
|
||||||
"servers": result.servers,
|
"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…
x
Reference in New Issue
Block a user