1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-27 22:18:51 +00:00

Create notification when responding to group membership invitation

This commit is contained in:
Pierre HUBERT 2021-01-24 18:29:19 +01:00
parent 4af2e71761
commit 5f70c32b96

View File

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