From 1c710ad965a3ce9908a861921057bc4994218077 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 24 Jan 2021 17:42:30 +0100 Subject: [PATCH] Delete notifications when cancelling an invitation --- 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 2e01183..b8229dc 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -171,7 +171,8 @@ pub fn cancel_invitation(r: &mut HttpRequestHandler) -> RequestResult { groups_helper::delete_member(&group_id, &user_id)?; - // TODO : delete related notifications + // Delete related notifications + notifications_helper::delete_all_related_to_group_membership_notifications(&user_id, &group_id)?; r.success("Membership invitation has been cancelled!") }