Files
continuwuity/src/api/server/version.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
581 B
Rust
Raw Normal View History

use conduwuit::Result;
use ruma::{api::federation::discovery::get_server_version, assign};
2024-06-05 04:32:58 +00:00
use crate::Ruma;
2024-06-05 04:32:58 +00:00
/// # `GET /_matrix/federation/v1/version`
///
/// Get version information on this server.
pub(crate) async fn get_server_version_route(
_body: Ruma<get_server_version::v1::Request>,
) -> Result<get_server_version::v1::Response> {
Ok(assign!(get_server_version::v1::Response::new(), {
server: Some(assign!(get_server_version::v1::Server::new(), {
2024-12-14 21:58:01 -05:00
name: Some(conduwuit::version::name().into()),
version: Some(conduwuit::version::version().into()),
})),
}))
2024-06-05 04:32:58 +00:00
}