Merge pull request #14 from jplatte/master

Fix two bytesize bugs (wrong json key, non-optional value that should be optional)
This commit is contained in:
Jimmy Cuadra 2017-08-01 10:00:05 -07:00 committed by GitHub
commit eca6d97690
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ pub struct PresenceEventContent {
pub avatar_url: Option<String>, pub avatar_url: Option<String>,
/// Whether or not the user is currently active. /// Whether or not the user is currently active.
pub currently_active: bool, pub currently_active: Option<bool>,
/// The current display name for this user. /// The current display name for this user.
#[serde(skip_serializing_if="Option::is_none")] #[serde(skip_serializing_if="Option::is_none")]

View File

@ -22,6 +22,7 @@ pub type ReceiptEventContent = HashMap<EventId, Receipts>;
#[derive(Clone, Debug, Deserialize, Serialize)] #[derive(Clone, Debug, 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")]
pub m_read: UserReceipts, pub m_read: UserReceipts,
} }