Use RoomId instead of String for room visibility endpoints
This commit is contained in:
parent
b064daf23d
commit
c725288cd0
@ -1,6 +1,7 @@
|
|||||||
//! [GET /_matrix/client/r0/directory/list/room/{roomId}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-directory-list-room-roomid)
|
//! [GET /_matrix/client/r0/directory/list/room/{roomId}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-directory-list-room-roomid)
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
|
use ruma_identifiers::RoomId;
|
||||||
|
|
||||||
use crate::r0::room::Visibility;
|
use crate::r0::room::Visibility;
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ ruma_api! {
|
|||||||
request {
|
request {
|
||||||
/// The ID of the room of which to request the visibility.
|
/// The ID of the room of which to request the visibility.
|
||||||
#[ruma_api(path)]
|
#[ruma_api(path)]
|
||||||
pub room_id: String,
|
pub room_id: RoomId,
|
||||||
}
|
}
|
||||||
|
|
||||||
response {
|
response {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
//! [PUT /_matrix/client/r0/directory/list/room/{roomId}](https://matrix.org/docs/spec/client_server/r0.6.0#put-matrix-client-r0-directory-list-room-roomid)
|
//! [PUT /_matrix/client/r0/directory/list/room/{roomId}](https://matrix.org/docs/spec/client_server/r0.6.0#put-matrix-client-r0-directory-list-room-roomid)
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
|
use ruma_identifiers::RoomId;
|
||||||
|
|
||||||
use crate::r0::room::Visibility;
|
use crate::r0::room::Visibility;
|
||||||
|
|
||||||
@ -17,7 +18,7 @@ ruma_api! {
|
|||||||
request {
|
request {
|
||||||
/// The ID of the room of which to set the visibility.
|
/// The ID of the room of which to set the visibility.
|
||||||
#[ruma_api(path)]
|
#[ruma_api(path)]
|
||||||
pub room_id: String,
|
pub room_id: RoomId,
|
||||||
|
|
||||||
/// New visibility setting for the room.
|
/// New visibility setting for the room.
|
||||||
pub visibility: Visibility,
|
pub visibility: Visibility,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user