From fdb5059b53288fa3a9458a17b6704d66f1434c37 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 12 Jun 2018 16:22:32 +0100 Subject: [PATCH] Add /room/ to path --- src/github.com/matrix-org/dendrite/appservice/query/query.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/appservice/query/query.go b/src/github.com/matrix-org/dendrite/appservice/query/query.go index 67a22761..42ef455b 100644 --- a/src/github.com/matrix-org/dendrite/appservice/query/query.go +++ b/src/github.com/matrix-org/dendrite/appservice/query/query.go @@ -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