mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Create a notification when responding to group membership request
This commit is contained in:
parent
30f133b2a3
commit
c042077067
@ -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!")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user