Can get information about rooms

This commit is contained in:
2025-11-21 14:52:21 +01:00
parent 1385afc974
commit ecbe4885c1
5 changed files with 71 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ 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_room_controller;
use matrixgw_backend::controllers::{
auth_controller, matrix_link_controller, matrix_sync_thread_controller, server_controller,
tokens_controller, ws_controller,
@@ -134,6 +135,15 @@ async fn main() -> std::io::Result<()> {
web::get().to(matrix_sync_thread_controller::status),
)
.service(web::resource("/api/ws").route(web::get().to(ws_controller::ws)))
// Matrix room controller
.route(
"/api/matrix/room/joined",
web::get().to(matrix_room_controller::joined_rooms),
)
.route(
"/api/matrix/room/{id}",
web::get().to(matrix_room_controller::single_room_info),
)
})
.workers(4)
.bind(&AppConfig::get().listen_address)?