- varie sistemazioni: filtri iscritti, profilo, ecc...

This commit is contained in:
Surya Paolo
2025-01-11 12:07:58 +01:00
parent fa075683ae
commit c631ca9d6a
6 changed files with 251 additions and 71 deletions

View File

@@ -745,7 +745,7 @@ sendNotifSchema.statics.saveAndSendNotif = async function (myrecnotif, req, res,
// console.log('myrecread._id', myrecread._id.toString());
if (myrecread)
risnotif = await globalTables.sendNotif(myrecread.typedir, myrecread.typeid, res, idapp, user ? user : req.user, myrecread);
risnotif = await globalTables.sendNotifCmd(myrecread.typedir, myrecread.typeid, res, idapp, user ? user : req.user, myrecread);
else
return false;
}
@@ -756,7 +756,7 @@ sendNotifSchema.statics.saveAndSendNotif = async function (myrecnotif, req, res,
}
} else {
risnotif = await globalTables.sendNotif(myrecout.typedir, myrecout.typeid, res, idapp, user ? user : req.user, myrecout);
risnotif = await globalTables.sendNotifCmd(myrecout.typedir, myrecout.typeid, res, idapp, user ? user : req.user, myrecout);
}

View File

@@ -2539,7 +2539,9 @@ UserSchema.statics.setFriendsCmd = async function (req, idapp, usernameOrig, use
const msgOrig = i18n.__({ phrase, locale: user.lang }, usernameOrig);
await telegrambot.sendMsgTelegram(idapp, usernameOrig, msgDest);
await telegrambot.sendMsgTelegram(idapp, usernameDest, msgOrig);
if (phrase !== 'HANDSHAKE_SET') {
await telegrambot.sendMsgTelegram(idapp, usernameDest, msgOrig);
}
}
} catch (e) {
console.error('Notification : ', e);