client-api: Remove serde aliases
This commit is contained in:
parent
d6b858c5fa
commit
00315d9c48
@ -87,11 +87,7 @@ pub mod v3 {
|
||||
/// If set to `true`, the client supports [refresh tokens].
|
||||
///
|
||||
/// [refresh tokens]: https://spec.matrix.org/v1.3/client-server-api/#refreshing-access-tokens
|
||||
#[serde(
|
||||
default,
|
||||
skip_serializing_if = "ruma_common::serde::is_default",
|
||||
alias = "org.matrix.msc2918.refresh_token",
|
||||
)]
|
||||
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||
pub refresh_token: bool,
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ pub mod v3 {
|
||||
pub one_time_keys: BTreeMap<OwnedDeviceKeyId, Raw<OneTimeKey>>,
|
||||
|
||||
/// Fallback public keys for "pre-key" messages.
|
||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty", alias = "org.matrix.msc2732.fallback_keys")]
|
||||
#[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
|
||||
pub fallback_keys: BTreeMap<OwnedDeviceKeyId, Raw<OneTimeKey>>,
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,6 @@ pub mod v3 {
|
||||
default,
|
||||
skip_serializing_if = "ruma_common::serde::is_default",
|
||||
rename = "xyz.amorgan.generate_blurhash",
|
||||
alias = "generate_blurhash"
|
||||
)]
|
||||
pub generate_blurhash: bool,
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ pub mod v3 {
|
||||
default,
|
||||
skip_serializing_if = "ruma_common::serde::is_default",
|
||||
rename = "fi.mau.msc2246.max_stall_ms",
|
||||
alias = "max_stall_ms"
|
||||
)]
|
||||
pub max_stall_ms: Option<UInt>,
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ pub mod v3 {
|
||||
default,
|
||||
skip_serializing_if = "ruma_common::serde::is_default",
|
||||
rename = "fi.mau.msc2246.max_stall_ms",
|
||||
alias = "max_stall_ms"
|
||||
)]
|
||||
pub max_stall_ms: Option<UInt>,
|
||||
}
|
||||
|
@ -43,11 +43,7 @@ pub mod v3 {
|
||||
/// This uses the unstable prefix in
|
||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||
#[cfg(feature = "unstable-msc2448")]
|
||||
#[serde(
|
||||
rename = "xyz.amorgan.blurhash",
|
||||
alias = "blurhash",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||
pub blurhash: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -47,11 +47,7 @@ pub mod v3 {
|
||||
/// This uses the unstable prefix in
|
||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||
#[cfg(feature = "unstable-msc2448")]
|
||||
#[serde(
|
||||
rename = "xyz.amorgan.blurhash",
|
||||
alias = "blurhash",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||
pub blurhash: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -49,11 +49,7 @@ pub mod v3 {
|
||||
/// This uses the unstable prefix in
|
||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||
#[cfg(feature = "unstable-msc2448")]
|
||||
#[serde(
|
||||
rename = "xyz.amorgan.blurhash",
|
||||
alias = "blurhash",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||
pub blurhash: Option<&'a str>,
|
||||
}
|
||||
|
||||
|
@ -50,11 +50,7 @@ pub mod v3 {
|
||||
/// If set to `true`, the client supports [refresh tokens].
|
||||
///
|
||||
/// [refresh tokens]: https://spec.matrix.org/v1.3/client-server-api/#refreshing-access-tokens
|
||||
#[serde(
|
||||
default,
|
||||
skip_serializing_if = "ruma_common::serde::is_default",
|
||||
alias = "org.matrix.msc2918.refresh_token",
|
||||
)]
|
||||
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||
pub refresh_token: bool,
|
||||
}
|
||||
|
||||
|
@ -217,11 +217,7 @@ pub mod v3 {
|
||||
#[cfg_attr(feature = "server", derive(serde::Deserialize))]
|
||||
struct RequestQuery {
|
||||
/// Timestamp to use for the `origin_server_ts` of the event.
|
||||
#[serde(
|
||||
alias = "org.matrix.msc3316.ts",
|
||||
rename = "ts",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[serde(rename = "ts", skip_serializing_if = "Option::is_none")]
|
||||
pub timestamp: Option<MilliSecondsSinceUnixEpoch>,
|
||||
}
|
||||
}
|
||||
|
@ -289,11 +289,7 @@ pub struct JoinedRoom {
|
||||
///
|
||||
/// [MSC2654]: https://github.com/matrix-org/matrix-spec-proposals/pull/2654
|
||||
#[cfg(feature = "unstable-msc2654")]
|
||||
#[serde(
|
||||
rename = "org.matrix.msc2654.unread_count",
|
||||
alias = "unread_count",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
#[serde(rename = "org.matrix.msc2654.unread_count", skip_serializing_if = "Option::is_none")]
|
||||
pub unread_count: Option<UInt>,
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user