add MSC4175 tz field to federation profile

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-09-06 23:19:16 -04:00
parent bf93f9caa6
commit 0aa4cc4f9c

View File

@ -64,6 +64,14 @@ pub mod v1 {
#[cfg(feature = "unstable-msc2448")] #[cfg(feature = "unstable-msc2448")]
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")] #[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
pub blurhash: Option<String>, pub blurhash: Option<String>,
/// [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<String>,
} }
impl Request { impl Request {
@ -97,6 +105,10 @@ pub mod v1 {
#[ruma_enum(rename = "avatar_url")] #[ruma_enum(rename = "avatar_url")]
AvatarUrl, AvatarUrl,
/// Timezone
#[ruma_enum(rename = "us.cloke.msc4175.tz")]
Tz,
#[doc(hidden)] #[doc(hidden)]
_Custom(PrivOwnedStr), _Custom(PrivOwnedStr),
} }