mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: set MSC4373 values
This commit is contained in:
@@ -226,6 +226,7 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
|
||||
.ruma_route(&server::well_known_server)
|
||||
.ruma_route(&server::get_content_route)
|
||||
.ruma_route(&server::get_content_thumbnail_route)
|
||||
.ruma_route(&server::get_edutypes_route)
|
||||
.route("/_conduwuit/local_user_count", get(client::conduwuit_local_user_count))
|
||||
.route("/_continuwuity/local_user_count", get(client::conduwuit_local_user_count));
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
use conduwuit::{Config, Result};
|
||||
use ruma::{api::federation::edutypes::get_edutypes};
|
||||
|
||||
use crate::Ruma;
|
||||
|
||||
/// # `GET /_matrix/federation/v1/edutypes`
|
||||
///
|
||||
/// Lists EDU types we wish to receive
|
||||
pub(crate) async fn get_edutypes_route(
|
||||
body: Ruma<get_edutypes::v1::Request>,
|
||||
config: &Config,
|
||||
) -> Result<get_edutypes::v1::Response> {
|
||||
Ok(get_edutypes::v1::Response {
|
||||
typing: config.allow_incoming_typing,
|
||||
presence: config.allow_incoming_presence,
|
||||
receipt: config.allow_incoming_read_receipts,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user