Use RoomId instead of String for room visibility endpoints

This commit is contained in:
iinuwa 2020-05-27 06:53:28 -05:00 committed by GitHub
parent b064daf23d
commit c725288cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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)
use ruma_api::ruma_api;
use ruma_identifiers::RoomId;
use crate::r0::room::Visibility;
@ -17,7 +18,7 @@ ruma_api! {
request {
/// The ID of the room of which to request the visibility.
#[ruma_api(path)]
pub room_id: String,
pub room_id: RoomId,
}
response {

View File

@ -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)
use ruma_api::ruma_api;
use ruma_identifiers::RoomId;
use crate::r0::room::Visibility;
@ -17,7 +18,7 @@ ruma_api! {
request {
/// The ID of the room of which to set the visibility.
#[ruma_api(path)]
pub room_id: String,
pub room_id: RoomId,
/// New visibility setting for the room.
pub visibility: Visibility,