From 8d7e5ca2bbeccb14623a718ad8597f991aa01c73 Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 30 Aug 2024 12:27:36 -0400 Subject: [PATCH] redirect/handle r0 media paths too Signed-off-by: strawberry --- src/api/router.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/router.rs b/src/api/router.rs index 94ec5571..c2d64599 100644 --- a/src/api/router.rs +++ b/src/api/router.rs @@ -249,7 +249,11 @@ pub fn build(router: Router, server: &Server) -> Router { .route("/_matrix/media/v3/config", any(legacy_media_disabled)) .route("/_matrix/media/v3/download/*path", any(legacy_media_disabled)) .route("/_matrix/media/v3/thumbnail/*path", any(legacy_media_disabled)) - .route("/_matrix/media/v3/preview_url", any(redirect_legacy_preview)); + .route("/_matrix/media/v3/preview_url", any(redirect_legacy_preview)) + .route("/_matrix/media/r0/config", any(legacy_media_disabled)) + .route("/_matrix/media/r0/download/*path", any(legacy_media_disabled)) + .route("/_matrix/media/r0/thumbnail/*path", any(legacy_media_disabled)) + .route("/_matrix/media/r0/preview_url", any(redirect_legacy_preview)); } router