diff --git a/crates/ruma-client-api/src/discovery/discover_homeserver.rs b/crates/ruma-client-api/src/discovery/discover_homeserver.rs index dd00f6eb..0f0f0b6a 100644 --- a/crates/ruma-client-api/src/discovery/discover_homeserver.rs +++ b/crates/ruma-client-api/src/discovery/discover_homeserver.rs @@ -30,7 +30,7 @@ ruma_api! { /// Information about the tile server to use to display location data. #[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, } diff --git a/crates/ruma-client-api/src/filter.rs b/crates/ruma-client-api/src/filter.rs index 760c7b38..9a885179 100644 --- a/crates/ruma-client-api/src/filter.rs +++ b/crates/ruma-client-api/src/filter.rs @@ -67,7 +67,7 @@ pub enum RelationType { Replacement, /// `m.thread`, a participant to a thread. - #[ruma_enum(rename = "io.element.thread")] + #[ruma_enum(rename = "io.element.thread", alias = "m.thread")] Thread, #[doc(hidden)] @@ -153,6 +153,7 @@ pub struct RoomEventFilter<'a> { #[cfg(feature = "unstable-msc3440")] #[serde( rename = "io.element.relation_types", + alias = "related_by_rel_types", default, skip_serializing_if = "<[_]>::is_empty" )] @@ -165,6 +166,7 @@ pub struct RoomEventFilter<'a> { #[cfg(feature = "unstable-msc3440")] #[serde( rename = "io.element.relation_senders", + alias = "related_by_senders", default, skip_serializing_if = "<[_]>::is_empty" )] diff --git a/crates/ruma-client-api/src/media/create_content.rs b/crates/ruma-client-api/src/media/create_content.rs index 69614bac..09926f7f 100644 --- a/crates/ruma-client-api/src/media/create_content.rs +++ b/crates/ruma-client-api/src/media/create_content.rs @@ -39,7 +39,12 @@ pub mod v3 { /// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448). #[ruma_api(query)] #[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, } @@ -52,7 +57,11 @@ 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", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "xyz.amorgan.blurhash", + alias = "blurhash", + skip_serializing_if = "Option::is_none" + )] pub blurhash: Option, } diff --git a/crates/ruma-client-api/src/profile/get_avatar_url.rs b/crates/ruma-client-api/src/profile/get_avatar_url.rs index 5587717c..f9023826 100644 --- a/crates/ruma-client-api/src/profile/get_avatar_url.rs +++ b/crates/ruma-client-api/src/profile/get_avatar_url.rs @@ -43,7 +43,11 @@ 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", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "xyz.amorgan.blurhash", + alias = "blurhash", + skip_serializing_if = "Option::is_none" + )] pub blurhash: Option, } diff --git a/crates/ruma-client-api/src/profile/get_profile.rs b/crates/ruma-client-api/src/profile/get_profile.rs index 14350eed..8748b3bd 100644 --- a/crates/ruma-client-api/src/profile/get_profile.rs +++ b/crates/ruma-client-api/src/profile/get_profile.rs @@ -47,7 +47,11 @@ 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", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "xyz.amorgan.blurhash", + alias = "blurhash", + skip_serializing_if = "Option::is_none" + )] pub blurhash: Option, } diff --git a/crates/ruma-client-api/src/profile/set_avatar_url.rs b/crates/ruma-client-api/src/profile/set_avatar_url.rs index 1e9ba34b..9d755aaa 100644 --- a/crates/ruma-client-api/src/profile/set_avatar_url.rs +++ b/crates/ruma-client-api/src/profile/set_avatar_url.rs @@ -49,7 +49,11 @@ 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", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "xyz.amorgan.blurhash", + alias = "blurhash", + skip_serializing_if = "Option::is_none" + )] pub blurhash: Option<&'a str>, }