Update serde attr, add comment
This commit is contained in:
parent
0d305d8f24
commit
c00a8cc52e
@ -17,22 +17,19 @@ ruma_event! {
|
|||||||
|
|
||||||
/// The rule used for users wishing to join this room.
|
/// The rule used for users wishing to join this room.
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "lowercase")]
|
||||||
pub enum JoinRule {
|
pub enum JoinRule {
|
||||||
/// A user who wishes to join the room must first receive an invite to the room from someone
|
/// A user who wishes to join the room must first receive an invite to the room from someone
|
||||||
/// already inside of the room.
|
/// already inside of the room.
|
||||||
#[serde(rename = "invite")]
|
|
||||||
Invite,
|
Invite,
|
||||||
|
|
||||||
/// Reserved but not yet implemented by the Matrix specification.
|
/// Reserved but not yet implemented by the Matrix specification.
|
||||||
#[serde(rename = "knock")]
|
|
||||||
Knock,
|
Knock,
|
||||||
|
|
||||||
/// Reserved but not yet implemented by the Matrix specification.
|
/// Reserved but not yet implemented by the Matrix specification.
|
||||||
#[serde(rename = "private")]
|
|
||||||
Private,
|
Private,
|
||||||
|
|
||||||
/// Anyone can join the room without any prior action.
|
/// Anyone can join the room without any prior action.
|
||||||
#[serde(rename = "public")]
|
|
||||||
Public,
|
Public,
|
||||||
|
|
||||||
/// Additional variants may be added in the future and will not be considered breaking changes
|
/// Additional variants may be added in the future and will not be considered breaking changes
|
||||||
|
@ -56,6 +56,8 @@ ruma_event! {
|
|||||||
/// contain information about that invitation.
|
/// contain information about that invitation.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub third_party_invite: Option<ThirdPartyInvite>,
|
pub third_party_invite: Option<ThirdPartyInvite>,
|
||||||
|
|
||||||
|
// FIXME: spec says there is an unsigned field in content, which seems like an error.
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user