tuwunel_api/server/
edu_types.rs1use axum::{Json, extract::State, response::IntoResponse};
2use serde_json::json;
3use tuwunel_core::Result;
4
5#[tracing::instrument(skip_all, level = "debug")]
9pub(crate) async fn get_edu_types_route(
10 State(services): State<crate::State>,
11) -> Result<impl IntoResponse> {
12 let cfg = &services.server.config;
13
14 Ok(Json(json!({
15 "m.presence": cfg.allow_incoming_presence,
16 "m.receipt": cfg.allow_incoming_read_receipts,
17 "m.typing": cfg.allow_incoming_typing,
18 })))
19}