Friendship Accepted and Refused (notification updated)

This commit is contained in:
Paolo Arena
2022-07-27 20:56:01 +02:00
parent 3515914f17
commit 50c6031789
10 changed files with 151 additions and 49 deletions

View File

@@ -898,7 +898,7 @@ module.exports = {
const req = this.getReqByPar(idapp, usernameOrig);
// CREATE NOTIFICATION IN TABLE SENDNOTIF
SendNotif.createNewNotifToSingleUser(req, null, username, true, shared_consts.TypeNotifs.TYPEDIR_FRIENDS, shared_consts.TypeNotifs.ID_FRIENDS_NEW_REC);
SendNotif.createNewNotifToSingleUser(req, null, {usernameDest: username}, true, shared_consts.TypeNotifs.TYPEDIR_FRIENDS, shared_consts.TypeNotifs.ID_FRIENDS_NEW_REC);
if (userrecDest) {
sendmynotif = false; // non lo rimandare 2 volte !

View File

@@ -287,6 +287,12 @@ module.exports = {
NEW_ADV_SECTOR: 32,
},
StatusNotifs: {
STATUS_FRIENDS_ACCEPTED: 1,
STATUS_FRIENDS_REFUSED: 2,
},
TypeNotifs: {
TYPEDIR_BACHECA: 1,
ID_BACHECA_NEW_GOOD: 1,
@@ -299,12 +305,17 @@ module.exports = {
TYPEDIR_FRIENDS: 3,
ID_FRIENDS_NEW_REC: 1,
ID_FRIENDS_ACCEPTED: 2,
ID_FRIENDS_REFUSED: 3,
TYPEDIR_CIRCUITS: 4,
TYPEDIR_GROUPS: 4,
ID_GROUP_NEW_REC: 1,
ID_GROUP_ACCEPTED: 2,
TYPEDIR_BOOKING: 5,
TYPEDIR_CIRCUITS: 5,
TYPEDIR_MSGS: 6,
TYPEDIR_BOOKING: 6,
TYPEDIR_MSGS: 7,
ID_MSGS_NEW_REC: 1,
},