From 62f3d4a6498462a2cda2fbcce02392e340b10daa Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Wed, 2 Feb 2022 21:10:11 +0100 Subject: [PATCH] client-api: Move keys route changes out of unstable-pre-spec --- crates/ruma-client-api/src/r0.rs | 1 - crates/ruma-client-api/src/r0/keys.rs | 2 -- crates/ruma-client-api/src/r0/keys/get_keys.rs | 8 +------- crates/ruma-client-api/src/r0/keys/upload_keys.rs | 3 +-- crates/ruma-client-api/src/r0/keys/upload_signatures.rs | 4 +--- crates/ruma-client-api/src/r0/keys/upload_signing_keys.rs | 4 +--- crates/ruma-common/src/encryption.rs | 1 - 7 files changed, 4 insertions(+), 19 deletions(-) diff --git a/crates/ruma-client-api/src/r0.rs b/crates/ruma-client-api/src/r0.rs index 57333741..fad328e9 100644 --- a/crates/ruma-client-api/src/r0.rs +++ b/crates/ruma-client-api/src/r0.rs @@ -11,7 +11,6 @@ pub mod device; pub mod directory; pub mod filter; pub mod keys; -#[cfg(feature = "unstable-pre-spec")] pub mod knock; pub mod media; pub mod membership; diff --git a/crates/ruma-client-api/src/r0/keys.rs b/crates/ruma-client-api/src/r0/keys.rs index 3a44f615..7ff39e10 100644 --- a/crates/ruma-client-api/src/r0/keys.rs +++ b/crates/ruma-client-api/src/r0/keys.rs @@ -5,7 +5,5 @@ pub mod get_key_changes; pub mod get_keys; pub mod upload_keys; -#[cfg(feature = "unstable-pre-spec")] pub mod upload_signatures; -#[cfg(feature = "unstable-pre-spec")] pub mod upload_signing_keys; diff --git a/crates/ruma-client-api/src/r0/keys/get_keys.rs b/crates/ruma-client-api/src/r0/keys/get_keys.rs index dd7d4958..20126db8 100644 --- a/crates/ruma-client-api/src/r0/keys/get_keys.rs +++ b/crates/ruma-client-api/src/r0/keys/get_keys.rs @@ -3,14 +3,11 @@ use std::{collections::BTreeMap, time::Duration}; use ruma_api::ruma_api; -use ruma_common::encryption::DeviceKeys; +use ruma_common::encryption::{CrossSigningKey, DeviceKeys}; use ruma_identifiers::{DeviceId, UserId}; use ruma_serde::Raw; use serde_json::Value as JsonValue; -#[cfg(feature = "unstable-pre-spec")] -use ruma_common::encryption::CrossSigningKey; - ruma_api! { metadata: { description: "Returns the current devices and identity keys for the given users.", @@ -60,17 +57,14 @@ ruma_api! { pub device_keys: BTreeMap, BTreeMap, Raw>>, /// Information on the master cross-signing keys of the queried users. - #[cfg(feature = "unstable-pre-spec")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub master_keys: BTreeMap, Raw>, /// Information on the self-signing keys of the queried users. - #[cfg(feature = "unstable-pre-spec")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub self_signing_keys: BTreeMap, Raw>, /// Information on the user-signing keys of the queried users. - #[cfg(feature = "unstable-pre-spec")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub user_signing_keys: BTreeMap, Raw>, } diff --git a/crates/ruma-client-api/src/r0/keys/upload_keys.rs b/crates/ruma-client-api/src/r0/keys/upload_keys.rs index 3d1ff595..040992b3 100644 --- a/crates/ruma-client-api/src/r0/keys/upload_keys.rs +++ b/crates/ruma-client-api/src/r0/keys/upload_keys.rs @@ -1,4 +1,4 @@ -//! [POST /_matrix/client/r0/keys/upload](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-keys-upload) +//! [POST /_matrix/client/r0/keys/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keysupload) use std::collections::BTreeMap; @@ -31,7 +31,6 @@ ruma_api! { pub one_time_keys: BTreeMap, Raw>, /// Fallback public keys for "pre-key" messages. - #[cfg(feature = "unstable-pre-spec")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty", rename = "org.matrix.msc2732.fallback_keys")] pub fallback_keys: BTreeMap, Raw>, } diff --git a/crates/ruma-client-api/src/r0/keys/upload_signatures.rs b/crates/ruma-client-api/src/r0/keys/upload_signatures.rs index 343b37ab..e4852017 100644 --- a/crates/ruma-client-api/src/r0/keys/upload_signatures.rs +++ b/crates/ruma-client-api/src/r0/keys/upload_signatures.rs @@ -1,6 +1,4 @@ -//! POST /_matrix/client/r0/keys/signatures/upload -//! -//! Defined in [MSC 1756](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1756-cross-signing.md#uploading-signing-keys) +//! [POST /_matrix/client/r0/keys/signatures/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keyssignaturesupload) use std::collections::BTreeMap; diff --git a/crates/ruma-client-api/src/r0/keys/upload_signing_keys.rs b/crates/ruma-client-api/src/r0/keys/upload_signing_keys.rs index ff37f736..ca50ad1d 100644 --- a/crates/ruma-client-api/src/r0/keys/upload_signing_keys.rs +++ b/crates/ruma-client-api/src/r0/keys/upload_signing_keys.rs @@ -1,6 +1,4 @@ -//! POST /_matrix/client/r0/keys/device_signing/upload -//! -//! Defined in [MSC 1756](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1756-cross-signing.md#uploading-signing-keys) +//! [POST /_matrix/client/r0/keys/device_signing/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keysdevice_signingupload) use ruma_api::ruma_api; use ruma_common::encryption::CrossSigningKey; diff --git a/crates/ruma-common/src/encryption.rs b/crates/ruma-common/src/encryption.rs index 0ceb3cfc..f0aa77e7 100644 --- a/crates/ruma-common/src/encryption.rs +++ b/crates/ruma-common/src/encryption.rs @@ -86,7 +86,6 @@ pub struct SignedKey { pub signatures: SignedKeySignatures, /// Is this key considered to be a fallback key, defaults to false. - #[cfg(feature = "unstable-pre-spec")] #[serde(default, skip_serializing_if = "ruma_serde::is_default")] pub fallback: bool, }