Add a constructor for create_room::Request
This commit is contained in:
parent
214c1b681f
commit
ba95fd6c4e
@ -24,6 +24,7 @@ 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`
|
||||||
|
|
||||||
Deprecations:
|
Deprecations:
|
||||||
|
|
||||||
|
@ -92,6 +92,26 @@ ruma_api! {
|
|||||||
error: crate::Error
|
error: crate::Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Request {
|
||||||
|
/// Creates a `Request` will all-default parameters.
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self {
|
||||||
|
creation_content: None,
|
||||||
|
initial_state: Vec::new(),
|
||||||
|
invite: Vec::new(),
|
||||||
|
invite_3pid: Vec::new(),
|
||||||
|
is_direct: None,
|
||||||
|
name: None,
|
||||||
|
power_level_content_override: None,
|
||||||
|
preset: None,
|
||||||
|
room_alias_name: None,
|
||||||
|
room_version: None,
|
||||||
|
topic: None,
|
||||||
|
visibility: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Extra options to be added to the `m.room.create` event.
|
/// Extra options to be added to the `m.room.create` event.
|
||||||
///
|
///
|
||||||
/// This is the same as the event content struct for `m.room.create`, but without some fields that
|
/// This is the same as the event content struct for `m.room.create`, but without some fields that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user