From 24fa42dcaef6c910d9016932897000972b1004c0 Mon Sep 17 00:00:00 2001 From: Derek Meer Date: Wed, 1 Aug 2018 20:09:50 -0700 Subject: [PATCH] added URI extraction and checking --- .../matrix-org/dendrite/appservice/routing/user.go | 7 +++++++ 1 file changed, 7 insertions(+) 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 f01f76b05..d2e02e94e 100644 --- a/src/github.com/matrix-org/dendrite/appservice/routing/user.go +++ b/src/github.com/matrix-org/dendrite/appservice/routing/user.go @@ -19,6 +19,13 @@ type URIToUIDResponse struct { func URIToUID(req *http.Request, cfg config.Dendrite) util.JSONResponse { // TODO: Implement homeserver := cfg.Matrix.ServerName + uri := req.URL.Query().Get("uri") + if uri == "" { + return util.JSONResponse{ + Code: http.StatusOK, + JSON: nil, + } + } return util.JSONResponse{ Code: http.StatusOK, JSON: nil,