Make use of /users/{userID} in relevant APIs (#522)

* Query whether a room alias exists on app services

Signed-off-by: Andrew Morgan <andrewm@matrix.org>

* Query AS /alias/ API at a lower level

* Add support for querying /users/ on appservices

* Have endpoints query AS users if not found locally
This commit is contained in:
Andrew Morgan 2018-08-20 02:45:17 -07:00 committed by Erik Johnston
parent 2382d363ab
commit 0b5ae4692e
13 changed files with 89 additions and 95 deletions

View file

@ -35,12 +35,13 @@ func main() {
federation := base.CreateFederationClient()
keyRing := keydb.CreateKeyRing(federation.Client, keyDB)
asQuery := base.CreateHTTPAppServiceAPIs()
alias, input, query := base.CreateHTTPRoomserverAPIs()
typingInputAPI := typingserver.SetupTypingServerComponent(base, cache.NewTypingCache())
clientapi.SetupClientAPIComponent(
base, deviceDB, accountDB, federation, &keyRing,
alias, input, query, typingInputAPI, transactions.New(),
alias, input, query, typingInputAPI, asQuery, transactions.New(),
)
base.SetupAndServeHTTP(string(base.Cfg.Listen.ClientAPI))