base: Add a method to check if the room is public.
This commit is contained in:
parent
76ce3fecb3
commit
22b13c369b
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue