From 6f9cb395069f75c63f9e2485da8dc7c02bbdf389 Mon Sep 17 00:00:00 2001 From: Simon Goller Date: Sun, 18 Jun 2017 18:12:35 +0200 Subject: [PATCH] Make aliases optional for global rooms query. The server response cannot be deserialized because the aliases attribute can be missing. Wrapped the alias attribute with an Option to fix the issue. --- src/r0/directory.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r0/directory.rs b/src/r0/directory.rs index 9190d11e..fc1c4c17 100644 --- a/src/r0/directory.rs +++ b/src/r0/directory.rs @@ -31,7 +31,8 @@ pub mod get_public_rooms { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct PublicRoomsChunk { /// Aliases of the room. - pub aliases: Vec, + //#[serde(skip_serializing_if = "Option::is_none")] + pub aliases: Option>, /// The URL for the room's avatar, if one is set. #[serde(skip_serializing_if = "Option::is_none")] pub avatar_url: Option,