From 0aa4cc4f9c5febacbdba7325129dffe75135890b Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 6 Sep 2024 23:19:16 -0400 Subject: [PATCH] add MSC4175 tz field to federation profile Signed-off-by: strawberry --- .../src/query/get_profile_information.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/ruma-federation-api/src/query/get_profile_information.rs b/crates/ruma-federation-api/src/query/get_profile_information.rs index eb135124..2dc37b79 100644 --- a/crates/ruma-federation-api/src/query/get_profile_information.rs +++ b/crates/ruma-federation-api/src/query/get_profile_information.rs @@ -64,6 +64,14 @@ pub mod v1 { #[cfg(feature = "unstable-msc2448")] #[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")] pub blurhash: Option, + + /// [MSC4175][msc]: `m.tz` field for specifying a timezone the user is in + /// + /// [msc]: https://github.com/matrix-org/matrix-spec-proposals/blob/clokep/profile-tz/proposals/4175-profile-field-time-zone.md + /// + /// TODO: strong type this to be a valid IANA timezone? + #[serde(rename = "us.cloke.msc4175.tz", skip_serializing_if = "Option::is_none")] + pub tz: Option, } impl Request { @@ -97,6 +105,10 @@ pub mod v1 { #[ruma_enum(rename = "avatar_url")] AvatarUrl, + /// Timezone + #[ruma_enum(rename = "us.cloke.msc4175.tz")] + Tz, + #[doc(hidden)] _Custom(PrivOwnedStr), }