Can request any media file

This commit is contained in:
2025-11-21 17:55:09 +01:00
parent 934e6a4cc1
commit 35b53fee5c
4 changed files with 21 additions and 4 deletions

View File

@@ -9,7 +9,9 @@ use actix_web::{App, HttpServer, web};
use matrixgw_backend::app_config::AppConfig;
use matrixgw_backend::broadcast_messages::BroadcastMessage;
use matrixgw_backend::constants;
use matrixgw_backend::controllers::matrix::{matrix_profile_controller, matrix_room_controller};
use matrixgw_backend::controllers::matrix::{
matrix_media_controller, matrix_profile_controller, matrix_room_controller,
};
use matrixgw_backend::controllers::{
auth_controller, matrix_link_controller, matrix_sync_thread_controller, server_controller,
tokens_controller, ws_controller,
@@ -157,6 +159,11 @@ async fn main() -> std::io::Result<()> {
"/api/matrix/profile/get_multiple",
web::post().to(matrix_profile_controller::get_multiple),
)
// Matrix media controller
.route(
"/api/matrix/media/{mxc}",
web::get().to(matrix_media_controller::serve_media_res),
)
})
.workers(4)
.bind(&AppConfig::get().listen_address)?