base: Add a method to check if the room is public.
parent
76ce3fecb3
commit
22b13c369b
|
@ -162,6 +162,10 @@ impl Room {
|
||||||
.clone()
|
.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_public(&self) -> bool {
|
||||||
|
matches!(self.joine_rules(), JoinRule::Public)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn joine_rules(&self) -> JoinRule {
|
pub fn joine_rules(&self) -> JoinRule {
|
||||||
self.inner.read().unwrap().base_info.join_rule.clone()
|
self.inner.read().unwrap().base_info.join_rule.clone()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue