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

Ready to update the list of members of a conversation

This commit is contained in:
2020-06-15 09:29:38 +02:00
parent b15a09cf07
commit 16298d54fb
2 changed files with 18 additions and 0 deletions

View File

@ -75,5 +75,15 @@ pub fn update_settings(r: &mut HttpRequestHandler) -> RequestResult {
)?;
}
// Update members list
if r.has_post_parameter("members") {
let members = r.post_numbers_list("members", 1);
let can_everyone_add_members = conversations_helper::can_everyone_add_members(conv_id)?;
if !is_moderator && !can_everyone_add_members {
r.forbidden("You can not update the list of members of this conversation!".to_string())?;
}
}
r.success("Conversation information successfully updated!")
}