diff --git a/crates/ruma-common/src/directory.rs b/crates/ruma-common/src/directory.rs index 6d9f4ae2..546d4120 100644 --- a/crates/ruma-common/src/directory.rs +++ b/crates/ruma-common/src/directory.rs @@ -25,6 +25,10 @@ pub struct PublicRoomsChunk { /// The canonical alias of the room, if any. #[serde(skip_serializing_if = "Option::is_none")] + #[cfg_attr( + feature = "compat", + serde(default, deserialize_with = "ruma_serde::empty_string_as_none") + )] pub canonical_alias: Option>, /// The name of the room, if any.