Make all fields in get_message_event response optional

This commit is contained in:
Jonas Platte 2020-04-28 19:37:42 +02:00
parent 762a65ec5e
commit 1c3f8712fa
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -61,12 +61,14 @@ ruma_api! {
response { response {
/// The token the pagination starts from. /// The token the pagination starts from.
pub start: String, #[serde(skip_serializing_if = "Option::is_none")]
pub start: Option<String>,
/// The token the pagination ends at.
#[serde(skip_serializing_if = "Option::is_none")]
pub end: Option<String>,
/// A list of room events. /// A list of room events.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub chunk: Vec<EventJson<RoomEvent>>, pub chunk: Vec<EventJson<RoomEvent>>,
/// The token the pagination ends at.
pub end: String,
/// A list of state events relevant to showing the `chunk`. /// A list of state events relevant to showing the `chunk`.
#[serde(default, skip_serializing_if = "Vec::is_empty")] #[serde(default, skip_serializing_if = "Vec::is_empty")]
pub state: Vec<EventJson<StateEvent>>, pub state: Vec<EventJson<StateEvent>>,