base: Add a method to check if the room is public.

This commit is contained in:
Damir Jelić 2021-01-04 18:26:53 +01:00
parent 76ce3fecb3
commit 22b13c369b

View file

@ -162,6 +162,10 @@ impl Room {
.clone()
}
pub fn is_public(&self) -> bool {
matches!(self.joine_rules(), JoinRule::Public)
}
pub fn joine_rules(&self) -> JoinRule {
self.inner.read().unwrap().base_info.join_rule.clone()
}