1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 16:35:17 +00:00

Can create group membership notifications

This commit is contained in:
2021-01-23 15:30:14 +01:00
parent fd5000aef9
commit bb06760437
3 changed files with 71 additions and 3 deletions

View File

@ -53,6 +53,13 @@ pub struct GroupMember {
pub following: bool,
}
impl GroupMember {
/// Check if a member of a group is a least a moderator of this group
pub fn is_moderator(&self) -> bool {
self.level <= GroupMembershipLevel::MODERATOR
}
}
#[cfg(test)]
mod tests {
use crate::data::group_member::GroupMembershipLevel;