mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 00:25:17 +00:00
Can create groups membership notifications (moderator > user)
This commit is contained in:
@ -113,7 +113,30 @@ export class NotificationsHelper {
|
||||
}
|
||||
|
||||
|
||||
// TODO : continue
|
||||
// Groups membership notifications
|
||||
else if (n.onElemType == NotifElemType.GROUP_MEMBERSHIP) {
|
||||
|
||||
// Complete the notification
|
||||
n.fromContainerType = NotifElemType.EMPTY;
|
||||
n.fromContainerID = 0;
|
||||
|
||||
// Check whether the notification has to be pushed to a single user
|
||||
// or to all the moderators of the group
|
||||
if(n.hasDestUserID) {
|
||||
|
||||
//Push the notification in private way (if it has a destination,
|
||||
//generally the target user of the membership request)
|
||||
await this.PushPrivate(n);
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
// Push the notification to all the moderators of the group
|
||||
throw new Error("//TODO Push notification to all members of the group");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Unsupported notification type
|
||||
else {
|
||||
|
Reference in New Issue
Block a user