client-api: Feature-gate join_rule field in PublicRoomsChunk
This commit is contained in:
parent
6dfd89b98d
commit
d3d5d4ee96
@ -6,6 +6,7 @@ pub mod get_room_visibility;
|
|||||||
pub mod set_room_visibility;
|
pub mod set_room_visibility;
|
||||||
|
|
||||||
use js_int::{uint, UInt};
|
use js_int::{uint, UInt};
|
||||||
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
use ruma_events::room::join_rules::JoinRule;
|
use ruma_events::room::join_rules::JoinRule;
|
||||||
use ruma_identifiers::{MxcUri, RoomAliasId, RoomId};
|
use ruma_identifiers::{MxcUri, RoomAliasId, RoomId};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
@ -56,6 +57,8 @@ pub struct PublicRoomsChunk {
|
|||||||
pub avatar_url: Option<MxcUri>,
|
pub avatar_url: Option<MxcUri>,
|
||||||
|
|
||||||
/// The joining rule for the room.
|
/// The joining rule for the room.
|
||||||
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))]
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub join_rule: Option<JoinRule>,
|
pub join_rule: Option<JoinRule>,
|
||||||
}
|
}
|
||||||
@ -77,6 +80,7 @@ impl PublicRoomsChunk {
|
|||||||
world_readable: false,
|
world_readable: false,
|
||||||
guest_can_join: false,
|
guest_can_join: false,
|
||||||
avatar_url: None,
|
avatar_url: None,
|
||||||
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
join_rule: None,
|
join_rule: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user