Add /room/ to path

This commit is contained in:
Andrew Morgan 2018-06-12 16:22:32 +01:00
parent b3c21540b6
commit 678a34c546

View file

@ -30,7 +30,7 @@ import (
log "github.com/sirupsen/logrus"
)
const remoteAppServiceRoomAliasExistsPath = "/rooms/"
const roomAliasExistsPath = "/rooms/"
// AppServiceQueryAPI is an implementation of api.AppServiceQueryAPI
type AppServiceQueryAPI struct {
@ -52,7 +52,7 @@ func (a *AppServiceQueryAPI) RoomAliasExists(
for _, appservice := range a.Cfg.Derived.ApplicationServices {
if appservice.URL != "" && appservice.IsInterestedInRoomAlias(request.Alias) {
// The full path to the rooms API, includes hs token
URL, err := url.Parse(appservice.URL)
URL, err := url.Parse(appservice.URL + roomAliasExistsPath)
URL.Path += request.Alias
apiURL := URL.String() + "?access_token=" + appservice.HSToken