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

Can change admin status of conversation members

This commit is contained in:
2021-03-06 18:19:53 +01:00
parent 2bcf0706de
commit dcf194aa6f
3 changed files with 33 additions and 3 deletions

View File

@ -75,6 +75,11 @@ impl Conversation {
!self.is_managed() && (self.is_admin(user_id) || self.can_everyone_add_members)
}
/// Check out whether a user can mark other admin or not
pub fn can_mark_other_users_admin(&self, user_id: &UserID) -> bool {
!self.is_managed() && self.is_admin(user_id)
}
/// Check out whether a user can remove members from a conversation or not
pub fn can_user_remove_members(&self, user_id: &UserID) -> bool {
!self.is_managed() && self.is_admin(user_id)