From dcb5e5900f85677371a7bef337292ffe45c2926e Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Sun, 11 Jul 2021 22:07:10 +0200 Subject: [PATCH] Getting capabilities requires authentication --- src/client_server/capabilities.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/client_server/capabilities.rs b/src/client_server/capabilities.rs index ddc213da..8740928d 100644 --- a/src/client_server/capabilities.rs +++ b/src/client_server/capabilities.rs @@ -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 { +#[cfg_attr( + feature = "conduit_bin", + get("/_matrix/client/r0/capabilities", data = "<_body>") +)] +#[tracing::instrument(skip(_body))] +pub async fn get_capabilities_route( + _body: Ruma, +) -> ConduitResult { let mut available = BTreeMap::new(); available.insert(RoomVersionId::Version6, RoomVersionStability::Stable);