1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 16:45:16 +00:00

Can create groups membership notifications (moderator > user)

This commit is contained in:
2020-03-24 18:47:34 +01:00
parent 9ced519618
commit 59925dab45
4 changed files with 65 additions and 4 deletions

View File

@ -8,6 +8,8 @@ import { GroupSettings } from "../entities/GroupSettings";
import { removeHTMLNodes, checkURL } from "../utils/StringUtils";
import { findKey } from "../utils/ArrayUtils";
import { checkVirtualDirectoryAvailability, VirtualDirType } from "../utils/VirtualDirsUtils";
import { NotificationsUtils } from "../utils/NotificationsUtils";
import { NotifEventType } from "../entities/Notification";
/**
* Groups API controller
@ -303,7 +305,9 @@ export class GroupsController {
await GroupsHelper.SendInvitation(groupID, userID);
// TODO : Create a notification
// Create a notification
await NotificationsUtils.CreateGroupMembershipNotification(
userID, h.getUserId(), groupID, NotifEventType.SENT_GROUP_MEMBERSHIP_INVITATION)
h.success("The user has been successfully invited to join the group!");
}