add more missing unspecced r0 endpoints, fix silly upload_signatures struct

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-11-19 17:46:26 -05:00
parent 2ab432fba1
commit cf31b8798f
8 changed files with 10 additions and 3 deletions

View File

@ -18,6 +18,7 @@ const METADATA: Metadata = metadata! {
rate_limited: false,
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/keys/claim",
1.0 => "/_matrix/client/r0/keys/claim",
1.1 => "/_matrix/client/v3/keys/claim",
}

View File

@ -17,6 +17,7 @@ pub mod v3 {
rate_limited: false,
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/keys/changes",
1.0 => "/_matrix/client/r0/keys/changes",
1.1 => "/_matrix/client/v3/keys/changes",
}

View File

@ -23,6 +23,7 @@ pub mod v3 {
rate_limited: false,
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/keys/query",
1.0 => "/_matrix/client/r0/keys/query",
1.1 => "/_matrix/client/v3/keys/query",
}

View File

@ -23,6 +23,7 @@ pub mod v3 {
rate_limited: false,
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/keys/upload",
1.0 => "/_matrix/client/r0/keys/upload",
1.1 => "/_matrix/client/v3/keys/upload",
}

View File

@ -28,6 +28,7 @@ pub mod v3 {
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/keys/signatures/upload",
1.0 => "/_matrix/client/r0/keys/signatures/upload",
1.1 => "/_matrix/client/v3/keys/signatures/upload",
}
};
@ -98,11 +99,11 @@ pub mod v3 {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Failure {
/// Machine-readable error code.
errcode: FailureErrorCode,
pub errcode: FailureErrorCode,
/// Human-readable error message.
#[cfg_attr(feature = "compat-upload-signatures", serde(alias = "message"))]
error: String,
pub error: String,
}
/// Error code for signed key processing failures.

View File

@ -22,6 +22,7 @@ pub mod v3 {
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/keys/device_signing/upload",
1.0 => "/_matrix/client/r0/keys/device_signing/upload",
1.1 => "/_matrix/client/v3/keys/device_signing/upload",
}
};

View File

@ -18,6 +18,7 @@ pub mod v3 {
authentication: AccessToken,
history: {
unstable => "/_matrix/client/unstable/xyz.amorgan.knock/knock/:room_id_or_alias",
1.0 => "/_matrix/client/r0/knock/:room_id_or_alias",
1.1 => "/_matrix/client/v3/knock/:room_id_or_alias",
}
};

View File

@ -18,7 +18,7 @@ use serde::{
Deserialize,
};
use serde_json::{from_str as from_json_str, value::RawValue as RawJsonValue};
use tracing::{debug, trace, error, warn};
use tracing::{debug, error, trace, warn};
use crate::{
power_levels::{