From b6021b11d20f69c8d425ac73287da0642aec9557 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 25 Jan 2021 18:38:47 +0100 Subject: [PATCH] Delete notifications related with a group when quitting it --- src/controllers/groups_controller.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/groups_controller.rs b/src/controllers/groups_controller.rs index ddbc47a..0084dfa 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -368,7 +368,8 @@ pub fn remove_membership(r: &mut HttpRequestHandler) -> RequestResult { groups_helper::delete_member(&group_id, &r.user_id()?)?; - // TODO : delete group membership notifications + // Delete group membership notifications + notifications_helper::delete_all_related_to_group_membership_notifications(r.user_id_ref()?, &group_id)?; r.success("Your membership has been successfully deleted!") }