From c745db7ebadeaa125bccd19731556db9055d95c8 Mon Sep 17 00:00:00 2001 From: Jimmy Cuadra Date: Thu, 13 Jun 2019 17:34:03 -0700 Subject: [PATCH] Fields in m.receipt are optional. --- src/receipt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/receipt.rs b/src/receipt.rs index c0ed27a9..28faf7d5 100644 --- a/src/receipt.rs +++ b/src/receipt.rs @@ -25,7 +25,7 @@ pub struct Receipts { /// A collection of users who have sent *m.read* receipts for this event. #[serde(rename = "m.read")] #[serde(default)] - pub read: UserReceipts, + pub read: Option, } /// A mapping of user ID to receipt. @@ -37,5 +37,5 @@ pub type UserReceipts = HashMap; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Receipt { /// The timestamp (milliseconds since the Unix epoch) when the receipt was sent. - pub ts: u64, + pub ts: Option, }