Update serde attrs in room::history_visibility

This commit is contained in:
Jonas Platte 2020-05-01 16:44:28 +02:00
parent db91721fab
commit 28136cf1f6
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -18,27 +18,24 @@ ruma_event! {
/// Who can see a room's history.
#[derive(Clone, Copy, Debug, PartialEq, Deserialize, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum HistoryVisibility {
/// Previous events are accessible to newly joined members from the point they were invited
/// onwards. Events stop being accessible when the member's state changes to something other
/// than *invite* or *join*.
#[serde(rename = "invited")]
Invited,
/// Previous events are accessible to newly joined members from the point they joined the room
/// onwards. Events stop being accessible when the member's state changes to something other
/// than *join*.
#[serde(rename = "joined")]
Joined,
/// Previous events are always accessible to newly joined members. All events in the room are
/// accessible, even those sent when the member was not a part of the room.
#[serde(rename = "shared")]
Shared,
/// All events while this is the `HistoryVisibility` value may be shared by any
/// participating homeserver with anyone, regardless of whether they have ever joined the room.
#[serde(rename = "world_readable")]
WorldReadable,
/// Additional variants may be added in the future and will not be considered breaking changes