1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-22 21:39:21 +00:00

Create a notification when responding to group membership request

This commit is contained in:
Pierre HUBERT 2021-01-25 18:37:07 +01:00
parent 30f133b2a3
commit c042077067

View File

@ -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!")
}