Notification New Group

This commit is contained in:
paoloar77
2022-07-28 23:27:51 +02:00
parent 7cda5dbb8b
commit 241e4255d4
9 changed files with 63 additions and 32 deletions

View File

@@ -1768,7 +1768,7 @@ UserSchema.statics.setGroupsCmd = async function(idapp, usernameOrig, groupnameD
// CREATE NOTIFICATION IN TABLE SENDNOTIF
const req = tools.getReqByPar(idapp, usernameOrig);
SendNotif.create(req, null, {usernameDest:'', groupnameDest}, true, shared_consts.TypeNotifs.TYPEDIR_GROUPS, shared_consts.TypeNotifs.ID_GROUP_ACCEPTED);
SendNotif.createNewNotifToSingleUser(req, null, {usernameDest:'', groupnameDest}, true, shared_consts.TypeNotifs.TYPEDIR_GROUPS, shared_consts.TypeNotifs.ID_GROUP_ACCEPTED);
// Elimina la richiesta:
update = {$pull: {req_users: {username: {$in: [usernameOrig]}}}};