From 7141312eb56f6ff819387bb5f1c838932d5d4b6d Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 25 Jan 2021 18:31:34 +0100 Subject: [PATCH] Delete notification when cancelling request --- 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 45a131d..d1255ea 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -267,7 +267,8 @@ pub fn cancel_request(r: &mut HttpRequestHandler) -> RequestResult { groups_helper::delete_member(&group_id, &r.user_id()?)?; - // TODO : delete any related notification + // Delete any related notification + notifications_helper::delete_all_related_to_group_membership_notifications(r.user_id_ref()?, &group_id)?; r.success("The request has been successfully cancelled!") }