client-api: Update get_message_events for v1.1
* Remove serde(skip_serializing_if = ...) attribute from chunk response field * Make the start response field required by changing its type from Option<String> to String
This commit is contained in:
parent
993cd30f46
commit
b3f7d0ed52
@ -18,6 +18,8 @@ Breaking changes:
|
|||||||
`r0::account::request_3pid_management_token_via_email`
|
`r0::account::request_3pid_management_token_via_email`
|
||||||
* `get_contacts` has been can now be found at `r0::account::get_3pids`
|
* `get_contacts` has been can now be found at `r0::account::get_3pids`
|
||||||
* Move `r0::uiaa::authorize_fallback` to `r0::uiaa::get_uiaa_fallback_page`
|
* Move `r0::uiaa::authorize_fallback` to `r0::uiaa::get_uiaa_fallback_page`
|
||||||
|
* Change type of field `start` of `r0::message::get_message_events::Response` to
|
||||||
|
`String` in accordance with the updated specification.
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//! [GET /_matrix/client/r0/rooms/{roomId}/messages](https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-rooms-roomid-messages)
|
//! [GET /_matrix/client/r0/rooms/{roomId}/messages](https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3roomsroomidmessages)
|
||||||
|
|
||||||
use js_int::{uint, UInt};
|
use js_int::{uint, UInt};
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
@ -65,15 +65,14 @@ ruma_api! {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
response: {
|
response: {
|
||||||
/// The token the pagination starts from.
|
/// The token the pagination starts from.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
pub start: String,
|
||||||
pub start: Option<String>,
|
|
||||||
|
|
||||||
/// The token the pagination ends at.
|
/// The token the pagination ends at.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end: Option<String>,
|
pub end: Option<String>,
|
||||||
|
|
||||||
/// A list of room events.
|
/// A list of room events.
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default)]
|
||||||
pub chunk: Vec<Raw<AnyRoomEvent>>,
|
pub chunk: Vec<Raw<AnyRoomEvent>>,
|
||||||
|
|
||||||
/// A list of state events relevant to showing the `chunk`.
|
/// A list of state events relevant to showing the `chunk`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user