mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Implement room aliases (#167)
* Add database functions to interact with aliases * Save room alias * Check if alias already exists * Implement local alias lookup * Implement alias removal * Move alias API * Handle case with no alias set for a room * Apply requested changes
This commit is contained in:
parent
3e394e9e21
commit
c7e36ba2a1
10 changed files with 663 additions and 18 deletions
|
@ -52,6 +52,7 @@ func main() {
|
|||
log.Info("config: ", cfg)
|
||||
|
||||
queryAPI := api.NewRoomserverQueryAPIHTTP(cfg.RoomServerURL(), nil)
|
||||
aliasAPI := api.NewRoomserverAliasAPIHTTP(cfg.RoomServerURL(), nil)
|
||||
|
||||
roomserverProducer := producers.NewRoomserverProducer(cfg.RoomServerURL())
|
||||
userUpdateProducer, err := producers.NewUserUpdateProducer(
|
||||
|
@ -97,7 +98,8 @@ func main() {
|
|||
log.Info("Starting client API server on ", cfg.Listen.ClientAPI)
|
||||
routing.Setup(
|
||||
http.DefaultServeMux, http.DefaultClient, *cfg, roomserverProducer,
|
||||
queryAPI, accountDB, deviceDB, federation, keyRing, userUpdateProducer,
|
||||
queryAPI, aliasAPI, accountDB, deviceDB, federation, keyRing,
|
||||
userUpdateProducer,
|
||||
)
|
||||
log.Fatal(http.ListenAndServe(string(cfg.Listen.ClientAPI), nil))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue