skip serialising identity_server if None, and return empty string for base_url identity server if null

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-28 22:29:19 -04:00
parent d01b3cc967
commit cab4d5e18f

View File

@ -354,7 +354,7 @@ pub mod v3 {
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<IdentityServerInfo>,
}
@ -385,6 +385,7 @@ pub mod v3 {
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
pub struct IdentityServerInfo {
/// The base URL for the identity server for client-server connections.
#[serde(default)]
pub base_url: String,
}