diff --git a/src/controllers/groups_controller.rs b/src/controllers/groups_controller.rs index 5afd4cf..ddbc47a 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -339,7 +339,11 @@ pub fn respond_request(r: &mut HttpRequestHandler) -> RequestResult { groups_helper::respond_request(&group_id, &user_id, accept)?; - // TODO : Create a notification + // Create a notification + notifications_helper::create_group_membership_notification(&user_id, Some(r.user_id_ref()?), &group_id, match accept { + true => NotifEventType::ACCEPTED_GROUP_MEMBERSHIP_REQUEST, + false => NotifEventType::REJECTED_GROUP_MEMBERSHIP_REQUEST + })?; r.success("The response to the request has been successfully saved!") }