mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-09-28 02:10:49 -04:00
Add unknown room alias check. Call it from directory_handler.get_association
This commit is contained in:
parent
f0c730252f
commit
b932600653
2 changed files with 61 additions and 43 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue