mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 07:19:22 +00:00
Create notification when responding to group membership invitation
This commit is contained in:
parent
4af2e71761
commit
5f70c32b96
@ -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!")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user