From b6312690cf925075f83f709d39eb71f26e4e0140 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 28 Mar 2020 14:59:12 +0100 Subject: [PATCH] Remove a TODO --- src/controllers/GroupsController.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/GroupsController.ts b/src/controllers/GroupsController.ts index 6844d3e..64a7e81 100644 --- a/src/controllers/GroupsController.ts +++ b/src/controllers/GroupsController.ts @@ -485,7 +485,12 @@ export class GroupsController { // Respond to the request await GroupsHelper.RespondRequest(groupID, userID, accept); - // TODO : create a notification + // Delete any previous notifications + await NotificationsHelper.DeleteNotificationsGroupsMembership(userID, groupID); + + // Create a notification + await NotificationsHelper.CreateGroupMembershipNotification(userID, h.getUserId(), groupID, + accept ? NotifEventType.ACCEPTED_GROUP_MEMBERSHIP_REQUEST : NotifEventType.REJECTED_GROUP_MEMBERSHIP_REQUEST) h.success("The response to the request has been successfully saved!"); }