mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-09 06:31:05 +01:00
Getting capabilities requires authentication
This commit is contained in:
parent
4732aa6782
commit
dcb5e5900f
1 changed files with 9 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
use crate::ConduitResult;
|
||||
use crate::Ruma;
|
||||
use ruma::{
|
||||
api::client::r0::capabilities::{
|
||||
get_capabilities, Capabilities, RoomVersionStability, RoomVersionsCapability,
|
||||
|
@ -13,9 +14,14 @@ use rocket::get;
|
|||
/// # `GET /_matrix/client/r0/capabilities`
|
||||
///
|
||||
/// Get information on this server's supported feature set and other relevent capabilities.
|
||||
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/capabilities"))]
|
||||
#[tracing::instrument]
|
||||
pub async fn get_capabilities_route() -> ConduitResult<get_capabilities::Response> {
|
||||
#[cfg_attr(
|
||||
feature = "conduit_bin",
|
||||
get("/_matrix/client/r0/capabilities", data = "<_body>")
|
||||
)]
|
||||
#[tracing::instrument(skip(_body))]
|
||||
pub async fn get_capabilities_route(
|
||||
_body: Ruma<get_capabilities::Request>,
|
||||
) -> ConduitResult<get_capabilities::Response> {
|
||||
let mut available = BTreeMap::new();
|
||||
available.insert(RoomVersionId::Version6, RoomVersionStability::Stable);
|
||||
|
||||
|
|
Loading…
Reference in a new issue