client-api: Move keys route changes out of unstable-pre-spec
This commit is contained in:
parent
39041286b9
commit
62f3d4a649
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<Box<UserId>, BTreeMap<Box<DeviceId>, Raw<DeviceKeys>>>,
|
||||
|
||||
/// 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<Box<UserId>, Raw<CrossSigningKey>>,
|
||||
|
||||
/// 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<Box<UserId>, Raw<CrossSigningKey>>,
|
||||
|
||||
/// 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<Box<UserId>, Raw<CrossSigningKey>>,
|
||||
}
|
||||
|
@ -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<Box<DeviceKeyId>, Raw<OneTimeKey>>,
|
||||
|
||||
/// 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<Box<DeviceKeyId>, Raw<OneTimeKey>>,
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user