Add a constructor for get_message_events::Request
This commit is contained in:
parent
ba95fd6c4e
commit
9ecc7c11cf
@ -24,7 +24,9 @@ Improvements:
|
|||||||
* Add method `into_event_content` for `r0::room::create_room::CreationContent`
|
* Add method `into_event_content` for `r0::room::create_room::CreationContent`
|
||||||
* Add room visibility endpoints: `r0::directory::{get_room_visibility, set_room_visibility}`.
|
* Add room visibility endpoints: `r0::directory::{get_room_visibility, set_room_visibility}`.
|
||||||
* Add is_empty helpers for structs in `r0::sync::sync_events`
|
* Add is_empty helpers for structs in `r0::sync::sync_events`
|
||||||
* Add a constructor for `r0::room::create_room::Request`
|
* Add a constructor for request structs of the followign endpoints
|
||||||
|
* `r0::room::create_room`
|
||||||
|
* `r0::message::get_message_events`
|
||||||
|
|
||||||
Deprecations:
|
Deprecations:
|
||||||
|
|
||||||
|
@ -82,6 +82,15 @@ ruma_api! {
|
|||||||
error: crate::Error
|
error: crate::Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Request {
|
||||||
|
/// Creates a `Request` with the given parameters.
|
||||||
|
///
|
||||||
|
/// All other parameters will be defaulted.
|
||||||
|
pub fn new(room_id: RoomId, from: String, dir: Direction) -> Self {
|
||||||
|
Self { room_id, from, to: None, dir, limit: default_limit(), filter: None }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn default_limit() -> UInt {
|
fn default_limit() -> UInt {
|
||||||
uint!(10)
|
uint!(10)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user