client-api: Allow /versions to optionally accept authentication

According to MSC4026.
This commit is contained in:
Kévin Commaille 2024-03-07 11:48:53 +01:00 committed by Kévin Commaille
parent f652cbb60f
commit 3997e445b5
2 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,8 @@ Improvements:
- Add optional cookie field to `session::sso_login*::v3` responses.
- Add support for local user erasure to `account::deactivate::v3::Request`,
according to MSC4025.
- Allow `discovery::get_supported_versions::v1` to optionally accept
authentication, according to MSC4026.
# 0.17.4

View File

@ -14,7 +14,7 @@ use ruma_common::{
const METADATA: Metadata = metadata! {
method: GET,
rate_limited: false,
authentication: None,
authentication: AccessTokenOptional,
history: {
1.0 => "/_matrix/client/versions",
}
@ -32,6 +32,9 @@ pub struct Response {
pub versions: Vec<String>,
/// Experimental features supported by the server.
///
/// Servers can enable some unstable features only for some users, so this
/// list might differ when an access token is provided.
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub unstable_features: BTreeMap<String, bool>,
}