diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-02-05 11:47:11 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-02-05 11:47:11 +0000 |
commit | b932600653a4585968a7d177b7ea7cb2ca33642a (patch) | |
tree | 244f4ebacfdd736abc02e5d2c943114ce95a8bb9 /synapse/handlers/directory.py | |
parent | Add unknown user ID check. Use store.get_aliases_for_room(room_id) when searc... (diff) | |
download | synapse-b932600653a4585968a7d177b7ea7cb2ca33642a.tar.xz |
Add unknown room alias check. Call it from directory_handler.get_association
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r-- | synapse/handlers/directory.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index 58e9a91562..000bf5793c 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -84,6 +84,13 @@ class DirectoryHandler(BaseHandler): if result: room_id = result.room_id servers = result.servers + else: + # Query AS to see if it exists + as_handler = self.hs.get_handlers().appservice_handler + result = yield as_handler.query_room_alias_exists(room_alias) + if result: + room_id = result.room_id + servers = result.servers else: try: result = yield self.federation.make_query( |