Update get_capabilites endpoint

This commit is contained in:
Jonas Platte 2020-06-01 01:21:06 +02:00
parent a892d7f654
commit b7bdb4aa52
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -1,6 +1,7 @@
//! [GET /_matrix/client/r0/capabilities](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-capabilities)
//! [GET /_matrix/client/r0/capabilities](https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-capabilities)
use ruma_api::ruma_api;
use ruma_identifiers::RoomVersionId;
use serde::{Deserialize, Serialize};
use serde_json::Value as JsonValue;
use std::collections::BTreeMap;
@ -56,17 +57,17 @@ pub struct RoomVersionsCapability {
pub default: String,
/// A detailed description of the room versions the server supports.
pub available: BTreeMap<String, RoomVersionStability>,
pub available: BTreeMap<RoomVersionId, RoomVersionStability>,
}
/// The stability of a room version
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
pub enum RoomVersionStability {
/// An unstable room version
/// Support for the given version is stable.
#[serde(rename = "stable")]
Stable,
/// A stable room version
/// Support for the given version is unstable.
#[serde(rename = "unstable")]
Unstable,
}