Update serde attrs in receipt

This commit is contained in:
Jonas Platte 2020-05-01 16:36:54 +02:00
parent 9b91529e36
commit db91721fab
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -32,8 +32,7 @@ ruma_event! {
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct Receipts { pub struct Receipts {
/// A collection of users who have sent *m.read* receipts for this event. /// A collection of users who have sent *m.read* receipts for this event.
#[serde(rename = "m.read")] #[serde(default, rename = "m.read")]
#[serde(default)]
pub read: Option<UserReceipts>, pub read: Option<UserReceipts>,
} }