From 2d4954fc9a36d33a09a1d37a82e9689a76f609a6 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 20 Apr 2017 15:25:23 +0100 Subject: [PATCH] Add more stub endpoints --- .../matrix-org/dendrite/clientapi/routing/routing.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go b/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go index 47eebc704..a7656cbdb 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/routing.go @@ -110,6 +110,16 @@ func Setup(servMux *http.ServeMux, httpClient *http.Client, cfg config.ClientAPI })), ) + // Riot logs get flooded unless this is handled + r0mux.Handle("/presence/{userID}/status", + make("presence", util.NewJSONRequestHandler(func(req *http.Request) util.JSONResponse { + return util.JSONResponse{ + Code: 200, + JSON: struct{}{}, + } + })), + ) + servMux.Handle("/metrics", prometheus.Handler()) servMux.Handle("/api/", http.StripPrefix("/api", apiMux)) }