From c2aa33e983c7426457b7e5f441b06accad3cb7fc Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Sun, 4 Aug 2024 19:04:26 +0200 Subject: [PATCH] Use `.stable`, fix prometheus metric --- clientapi/routing/routing.go | 2 +- mediaapi/routing/routing.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index 4e7a05b82..cce150343 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -94,7 +94,7 @@ func Setup( unstableFeatures := map[string]bool{ "org.matrix.e2e_cross_signing": true, "org.matrix.msc2285.stable": true, - "org.matrix.msc3916": true, + "org.matrix.msc3916.stable": true, } for _, msc := range cfg.MSCs.MSCs { unstableFeatures["org.matrix."+msc] = true diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go index 82d397e00..63d5cbcf4 100644 --- a/mediaapi/routing/routing.go +++ b/mediaapi/routing/routing.go @@ -105,7 +105,7 @@ func Setup( ).Methods(http.MethodGet, http.MethodOptions) // v1 client endpoints requiring auth - downloadHandlerAuthed := httputil.MakeHTMLAPI("download_authed_client", userAPI, cfg.Global.Metrics.Enabled, downloadHandler, httputil.WithAuth()) + downloadHandlerAuthed := httputil.MakeHTMLAPI("download", userAPI, cfg.Global.Metrics.Enabled, makeDownloadAPI("download_authed_client", &cfg.MediaAPI, rateLimits, db, client, federationClient, activeRemoteRequests, activeThumbnailGeneration, false), httputil.WithAuth()) v1mux.Handle("/config", configHandler).Methods(http.MethodGet, http.MethodOptions) v1mux.Handle("/download/{serverName}/{mediaId}", downloadHandlerAuthed).Methods(http.MethodGet, http.MethodOptions) v1mux.Handle("/download/{serverName}/{mediaId}/{downloadName}", downloadHandlerAuthed).Methods(http.MethodGet, http.MethodOptions)