client-api: Move keys route changes out of unstable-pre-spec

This commit is contained in:
Jonas Platte 2022-02-02 21:10:11 +01:00
parent 39041286b9
commit 62f3d4a649
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
7 changed files with 4 additions and 19 deletions

View File

@ -11,7 +11,6 @@ pub mod device;
pub mod directory; pub mod directory;
pub mod filter; pub mod filter;
pub mod keys; pub mod keys;
#[cfg(feature = "unstable-pre-spec")]
pub mod knock; pub mod knock;
pub mod media; pub mod media;
pub mod membership; pub mod membership;

View File

@ -5,7 +5,5 @@ pub mod get_key_changes;
pub mod get_keys; pub mod get_keys;
pub mod upload_keys; pub mod upload_keys;
#[cfg(feature = "unstable-pre-spec")]
pub mod upload_signatures; pub mod upload_signatures;
#[cfg(feature = "unstable-pre-spec")]
pub mod upload_signing_keys; pub mod upload_signing_keys;

View File

@ -3,14 +3,11 @@
use std::{collections::BTreeMap, time::Duration}; use std::{collections::BTreeMap, time::Duration};
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_common::encryption::DeviceKeys; use ruma_common::encryption::{CrossSigningKey, DeviceKeys};
use ruma_identifiers::{DeviceId, UserId}; use ruma_identifiers::{DeviceId, UserId};
use ruma_serde::Raw; use ruma_serde::Raw;
use serde_json::Value as JsonValue; use serde_json::Value as JsonValue;
#[cfg(feature = "unstable-pre-spec")]
use ruma_common::encryption::CrossSigningKey;
ruma_api! { ruma_api! {
metadata: { metadata: {
description: "Returns the current devices and identity keys for the given users.", description: "Returns the current devices and identity keys for the given users.",
@ -60,17 +57,14 @@ ruma_api! {
pub device_keys: BTreeMap<Box<UserId>, BTreeMap<Box<DeviceId>, Raw<DeviceKeys>>>, pub device_keys: BTreeMap<Box<UserId>, BTreeMap<Box<DeviceId>, Raw<DeviceKeys>>>,
/// Information on the master cross-signing keys of the queried users. /// Information on the master cross-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub master_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>, pub master_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
/// Information on the self-signing keys of the queried users. /// Information on the self-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub self_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>, pub self_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
/// Information on the user-signing keys of the queried users. /// Information on the user-signing keys of the queried users.
#[cfg(feature = "unstable-pre-spec")]
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
pub user_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>, pub user_signing_keys: BTreeMap<Box<UserId>, Raw<CrossSigningKey>>,
} }

View File

@ -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; use std::collections::BTreeMap;
@ -31,7 +31,6 @@ ruma_api! {
pub one_time_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>, pub one_time_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>,
/// Fallback public keys for "pre-key" messages. /// 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")] #[serde(default, skip_serializing_if = "BTreeMap::is_empty", rename = "org.matrix.msc2732.fallback_keys")]
pub fallback_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>, pub fallback_keys: BTreeMap<Box<DeviceKeyId>, Raw<OneTimeKey>>,
} }

View File

@ -1,6 +1,4 @@
//! POST /_matrix/client/r0/keys/signatures/upload //! [POST /_matrix/client/r0/keys/signatures/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keyssignaturesupload)
//!
//! Defined in [MSC 1756](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1756-cross-signing.md#uploading-signing-keys)
use std::collections::BTreeMap; use std::collections::BTreeMap;

View File

@ -1,6 +1,4 @@
//! POST /_matrix/client/r0/keys/device_signing/upload //! [POST /_matrix/client/r0/keys/device_signing/upload](https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3keysdevice_signingupload)
//!
//! Defined in [MSC 1756](https://github.com/matrix-org/matrix-doc/blob/master/proposals/1756-cross-signing.md#uploading-signing-keys)
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_common::encryption::CrossSigningKey; use ruma_common::encryption::CrossSigningKey;

View File

@ -86,7 +86,6 @@ pub struct SignedKey {
pub signatures: SignedKeySignatures, pub signatures: SignedKeySignatures,
/// Is this key considered to be a fallback key, defaults to false. /// 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")] #[serde(default, skip_serializing_if = "ruma_serde::is_default")]
pub fallback: bool, pub fallback: bool,
} }