Fix notifications on channel changes

This commit is contained in:
Conrad Irwin
2023-10-18 15:56:33 -06:00
parent 0ce1ec5d15
commit 2b11463567
6 changed files with 598 additions and 262 deletions
+16
View File
@@ -114,6 +114,22 @@ impl ChannelRole {
other
}
}
pub fn can_see_all_descendants(&self) -> bool {
use ChannelRole::*;
match self {
Admin | Member => true,
Guest | Banned => false,
}
}
pub fn can_only_see_public_descendants(&self) -> bool {
use ChannelRole::*;
match self {
Guest => true,
Admin | Member | Banned => false,
}
}
}
impl From<proto::ChannelRole> for ChannelRole {