use axum::{response::IntoResponse, routing::get, Json, Router}; use serde_json::json; pub fn router() -> Router { Router::new() .route("/.well-known/matrix/server", get(get_matrix_server)) .route("/.well-known/matrix/client", get(get_matrix_client)) } async fn get_matrix_server() -> impl IntoResponse { Json(json!({"m.server": "matrix.rustybever.be:443"})) } async fn get_matrix_client() -> impl IntoResponse { Json(json!({"m.homeserver": {"base_url": "https://matrix.rustybever.be"}})) }