diff --git a/src/controllers/groups_controller.rs b/src/controllers/groups_controller.rs index b8229dc..7e988aa 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -210,7 +210,11 @@ pub fn respond_invitation(r: &mut HttpRequestHandler) -> RequestResult { groups_helper::set_following(&group_id, &r.user_id()?, true)?; } - // TODO : Create a notification + // Create a notification + notifications_helper::create_group_membership_notification(r.user_id_ref()?, None, &group_id, match accept { + true => NotifEventType::ACCEPTED_GROUP_MEMBERSHIP_INVITATION, + false => NotifEventType::REJECTED_GROUP_MEMBERSHIP_INVITATION + })?; r.success("Response to the invitation was successfully saved!") }