From 4b3bd4509259075dffe919b0b878a0c9ad2be92a Mon Sep 17 00:00:00 2001 From: Derek Meer Date: Fri, 3 Aug 2018 13:04:49 -0700 Subject: [PATCH] changed Matrix homeserver URL in request to App Service URL --- src/github.com/matrix-org/dendrite/appservice/routing/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/appservice/routing/user.go b/src/github.com/matrix-org/dendrite/appservice/routing/user.go index a4b49eaee..fab536d0b 100644 --- a/src/github.com/matrix-org/dendrite/appservice/routing/user.go +++ b/src/github.com/matrix-org/dendrite/appservice/routing/user.go @@ -27,14 +27,14 @@ func URIToUID(req *http.Request, cfg config.Dendrite) util.JSONResponse { JSON: nil, } } - baseReqURL := "http://" + string(cfg.Matrix.ServerName) + "/_matrix/app/unstable/thirdparty/user/" for _, appservice := range cfg.Derived.ApplicationServices { // Check all the fields associated with each application service if !appservice.IsInterestedInUserID(uri) { continue } // call the application service - reqURL := baseReqURL + appservice.ID + "?access_token=" + appservice.HSToken + + reqURL := "http://" + appservice.URL + "/_matrix/app/unstable/thirdparty/user/" + + appservice.ID + "?access_token=" + appservice.HSToken + "&fields=" + uri resp, err := http.Get(reqURL) // take the first successful match and send that back to the user