client-api: sync::v5::Request::timeline_limit
is not optional. (#1914)
Contrary to MSC3575, MSC4186 has `timeline_limit` which is not optional. This patch changes `timeline_limit: Option<UInt>` to `Int` directly.
This commit is contained in:
parent
463904db31
commit
85b412ffed
@ -980,7 +980,7 @@ impl From<v5::request::List> for SyncRequestList {
|
|||||||
#[cfg(feature = "unstable-msc4186")]
|
#[cfg(feature = "unstable-msc4186")]
|
||||||
impl From<v5::request::RoomDetails> for RoomDetailsConfig {
|
impl From<v5::request::RoomDetails> for RoomDetailsConfig {
|
||||||
fn from(value: v5::request::RoomDetails) -> Self {
|
fn from(value: v5::request::RoomDetails) -> Self {
|
||||||
Self { required_state: value.required_state, timeline_limit: value.timeline_limit }
|
Self { required_state: value.required_state, timeline_limit: Some(value.timeline_limit) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1000,7 +1000,7 @@ impl From<v5::request::RoomSubscription> for RoomSubscription {
|
|||||||
fn from(value: v5::request::RoomSubscription) -> Self {
|
fn from(value: v5::request::RoomSubscription) -> Self {
|
||||||
Self {
|
Self {
|
||||||
required_state: value.required_state,
|
required_state: value.required_state,
|
||||||
timeline_limit: value.timeline_limit,
|
timeline_limit: Some(value.timeline_limit),
|
||||||
include_heroes: value.include_heroes,
|
include_heroes: value.include_heroes,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,8 +154,7 @@ pub mod request {
|
|||||||
pub required_state: Vec<(StateEventType, String)>,
|
pub required_state: Vec<(StateEventType, String)>,
|
||||||
|
|
||||||
/// The maximum number of timeline events to return per room.
|
/// The maximum number of timeline events to return per room.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
pub timeline_limit: UInt,
|
||||||
pub timeline_limit: Option<UInt>,
|
|
||||||
|
|
||||||
/// Include the room heroes.
|
/// Include the room heroes.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@ -171,8 +170,7 @@ pub mod request {
|
|||||||
pub required_state: Vec<(StateEventType, String)>,
|
pub required_state: Vec<(StateEventType, String)>,
|
||||||
|
|
||||||
/// The maximum number of timeline events to return per room.
|
/// The maximum number of timeline events to return per room.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
pub timeline_limit: UInt,
|
||||||
pub timeline_limit: Option<UInt>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sliding sync request extensions (see [`super::Request::extensions`]).
|
/// Sliding sync request extensions (see [`super::Request::extensions`]).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user