From fa4ad103f475e6ee1d4e9170ea7f3eec930c87ed Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 17 Jun 2022 12:03:18 +0200 Subject: [PATCH] client-api: Add missing serde attributes --- .../src/discovery/discover_homeserver.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/ruma-client-api/src/discovery/discover_homeserver.rs b/crates/ruma-client-api/src/discovery/discover_homeserver.rs index 744f4fb8..1c3ef9b9 100644 --- a/crates/ruma-client-api/src/discovery/discover_homeserver.rs +++ b/crates/ruma-client-api/src/discovery/discover_homeserver.rs @@ -25,17 +25,21 @@ ruma_api! { pub homeserver: HomeserverInfo, /// Information about the identity server to connect to. - #[serde(rename = "m.identity_server")] + #[serde(rename = "m.identity_server", skip_serializing_if = "Option::is_none")] pub identity_server: Option, /// Information about the tile server to use to display location data. #[cfg(feature = "unstable-msc3488")] - #[serde(rename = "org.matrix.msc3488.tile_server", alias = "m.tile_server")] + #[serde( + rename = "org.matrix.msc3488.tile_server", + alias = "m.tile_server", + skip_serializing_if = "Option::is_none", + )] pub tile_server: Option, /// Information about the authentication server to connect to when using OpenID Connect. #[cfg(feature = "unstable-msc2965")] - #[serde(rename = "m.authentication")] + #[serde(rename = "m.authentication", skip_serializing_if = "Option::is_none")] pub authentication: Option, }