From fcd2a50f4f78ba473b1258789c2ef123b5a31263 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 3 Aug 2017 22:42:08 +0200 Subject: [PATCH] UnreadNotificationsCount: Make fields optional --- src/r0/sync.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/r0/sync.rs b/src/r0/sync.rs index 78603e65..b698d6ec 100644 --- a/src/r0/sync.rs +++ b/src/r0/sync.rs @@ -305,9 +305,11 @@ pub mod sync_events { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct UnreadNotificationsCount { /// The number of unread notifications for this room with the highlight flag set. - pub highlight_count: u64, + #[serde(skip_serializing_if = "Option::is_none")] + pub highlight_count: Option, /// The total number of unread notifications for this room. - pub notification_count: u64, + #[serde(skip_serializing_if = "Option::is_none")] + pub notification_count: Option, } /// Events in the room.