client-api: Deserialize stable names for unstable features
This commit is contained in:
parent
d8617d4dcb
commit
5c2c13145d
@ -30,7 +30,7 @@ ruma_api! {
|
|||||||
|
|
||||||
/// Information about the tile server to use to display location data.
|
/// Information about the tile server to use to display location data.
|
||||||
#[cfg(feature = "unstable-msc3488")]
|
#[cfg(feature = "unstable-msc3488")]
|
||||||
#[serde(rename = "org.matrix.msc3488.tile_server")]
|
#[serde(rename = "org.matrix.msc3488.tile_server", alias = "m.tile_server")]
|
||||||
pub tile_server: Option<TileServerInfo>,
|
pub tile_server: Option<TileServerInfo>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ pub enum RelationType {
|
|||||||
Replacement,
|
Replacement,
|
||||||
|
|
||||||
/// `m.thread`, a participant to a thread.
|
/// `m.thread`, a participant to a thread.
|
||||||
#[ruma_enum(rename = "io.element.thread")]
|
#[ruma_enum(rename = "io.element.thread", alias = "m.thread")]
|
||||||
Thread,
|
Thread,
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
@ -153,6 +153,7 @@ pub struct RoomEventFilter<'a> {
|
|||||||
#[cfg(feature = "unstable-msc3440")]
|
#[cfg(feature = "unstable-msc3440")]
|
||||||
#[serde(
|
#[serde(
|
||||||
rename = "io.element.relation_types",
|
rename = "io.element.relation_types",
|
||||||
|
alias = "related_by_rel_types",
|
||||||
default,
|
default,
|
||||||
skip_serializing_if = "<[_]>::is_empty"
|
skip_serializing_if = "<[_]>::is_empty"
|
||||||
)]
|
)]
|
||||||
@ -165,6 +166,7 @@ pub struct RoomEventFilter<'a> {
|
|||||||
#[cfg(feature = "unstable-msc3440")]
|
#[cfg(feature = "unstable-msc3440")]
|
||||||
#[serde(
|
#[serde(
|
||||||
rename = "io.element.relation_senders",
|
rename = "io.element.relation_senders",
|
||||||
|
alias = "related_by_senders",
|
||||||
default,
|
default,
|
||||||
skip_serializing_if = "<[_]>::is_empty"
|
skip_serializing_if = "<[_]>::is_empty"
|
||||||
)]
|
)]
|
||||||
|
@ -39,7 +39,12 @@ pub mod v3 {
|
|||||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[ruma_api(query)]
|
#[ruma_api(query)]
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default", rename = "xyz.amorgan.blurhash")]
|
#[serde(
|
||||||
|
default,
|
||||||
|
skip_serializing_if = "ruma_common::serde::is_default",
|
||||||
|
rename = "xyz.amorgan.generate_blurhash",
|
||||||
|
alias = "generate_blurhash"
|
||||||
|
)]
|
||||||
pub generate_blurhash: bool,
|
pub generate_blurhash: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +57,11 @@ pub mod v3 {
|
|||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(
|
||||||
|
rename = "xyz.amorgan.blurhash",
|
||||||
|
alias = "blurhash",
|
||||||
|
skip_serializing_if = "Option::is_none"
|
||||||
|
)]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,11 @@ pub mod v3 {
|
|||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(
|
||||||
|
rename = "xyz.amorgan.blurhash",
|
||||||
|
alias = "blurhash",
|
||||||
|
skip_serializing_if = "Option::is_none"
|
||||||
|
)]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,11 @@ pub mod v3 {
|
|||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(
|
||||||
|
rename = "xyz.amorgan.blurhash",
|
||||||
|
alias = "blurhash",
|
||||||
|
skip_serializing_if = "Option::is_none"
|
||||||
|
)]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,11 @@ pub mod v3 {
|
|||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(
|
||||||
|
rename = "xyz.amorgan.blurhash",
|
||||||
|
alias = "blurhash",
|
||||||
|
skip_serializing_if = "Option::is_none"
|
||||||
|
)]
|
||||||
pub blurhash: Option<&'a str>,
|
pub blurhash: Option<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user