From 8527ae9c5027f135a31c0c52e19651b49017bcf5 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 15 Jun 2020 10:53:50 +0200 Subject: [PATCH] Fix bad check --- src/controllers/conversations_controller.rs | 5 +---- src/helpers/conversations_helper.rs | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/controllers/conversations_controller.rs b/src/controllers/conversations_controller.rs index 9b5ea51..fb2eb21 100644 --- a/src/controllers/conversations_controller.rs +++ b/src/controllers/conversations_controller.rs @@ -88,10 +88,7 @@ pub fn update_settings(r: &mut HttpRequestHandler) -> RequestResult { members.push(r.user_id()?); } - conversations_helper::set_members( - conv_id, - &members, - can_everyone_add_members)?; + conversations_helper::set_members(conv_id, &members, is_moderator)?; } r.success("Conversation information successfully updated!") diff --git a/src/helpers/conversations_helper.rs b/src/helpers/conversations_helper.rs index 364f281..4028267 100644 --- a/src/helpers/conversations_helper.rs +++ b/src/helpers/conversations_helper.rs @@ -159,7 +159,6 @@ pub fn set_members(conv_id: u64, new_list: &Vec, can_delete: bool) -> Re if new_list.contains(&member) { continue; } - remove_member(conv_id, member)?; } }