bottoni fiducia
This commit is contained in:
20
logtrans.txt
20
logtrans.txt
@@ -97,3 +97,23 @@ Gio 12/10 ORE 08:06: [<b>Circuito RIS Rimini</b>]: Inviate Monete da paoloar77 a
|
||||
Saldi:
|
||||
paoloar77: -18 RIS]
|
||||
SuryaArena2: 7 RIS]
|
||||
Mer 29/11 ORE 16:35: [<b>Circuito RIS Italia</b>]: Inviate Monete da SuryaArena a paoloar77 5 RIS [causale: Seconda]
|
||||
Saldi:
|
||||
SuryaArena: -5 RIS]
|
||||
paoloar77: 5 RIS]
|
||||
Mer 29/11 ORE 16:44: [<b>Circuito RIS Italia</b>]: Inviate Monete da SuryaArena a paoloar77 3 RIS [causale: Eccolo]
|
||||
Saldi:
|
||||
SuryaArena: -8 RIS]
|
||||
paoloar77: 8 RIS]
|
||||
Mer 29/11 ORE 16:50: [<b>Circuito RIS Italia</b>]: Inviate Monete da SuryaArena a paoloar77 3 RIS [causale: Ricevuto un bel massaggio]
|
||||
Saldi:
|
||||
SuryaArena: -11 RIS]
|
||||
paoloar77: 11 RIS]
|
||||
Mer 29/11 ORE 16:52: [<b>Circuito RIS Bologna</b>]: Inviate Monete da SuryaArena a paoloar77 4 RIS [causale: Un bel massaggio con olio caldo]
|
||||
Saldi:
|
||||
SuryaArena: -4 RIS]
|
||||
paoloar77: 14 RIS]
|
||||
Mer 29/11 ORE 17:14: [<b>Circuito RIS Italia</b>]: Inviate Monete da SuryaArena a paoloar77 2 RIS [causale: Massaggio !]
|
||||
Saldi:
|
||||
SuryaArena: -13 RIS]
|
||||
paoloar77: 13 RIS]
|
||||
@@ -109,5 +109,9 @@
|
||||
"SENDMSG_ENTRA_IN_RISO_ITALIA": "Ciao %s!<br>%s che appartiene al <em>%s</em> vuole inviarti dei RIS. Per poterli ricevere dovete entrambi utilizzare il <strong>Circuito RIS Italia</strong>.",
|
||||
"CLICCA_QUI": "CLICCA QUI",
|
||||
"✅ %s è stato Abilitato correttamente (da %s)!": "✅ %s è stato Abilitato correttamente (da %s)!",
|
||||
"✅ Sei stato Abilitato correttamente da %s!": "✅ Sei stato Abilitato correttamente da %s!"
|
||||
"✅ Sei stato Abilitato correttamente da %s!": "✅ Sei stato Abilitato correttamente da %s!",
|
||||
"🚫 Hai rifiutato l'accesso alla App di RISO da parte di %s!": "🚫 Hai rifiutato l'accesso alla App di RISO da parte di %s!",
|
||||
"🚫 Ti è stato rifiutato l'accesso. Probabilmente l'username con cui ti sei registrato non ti conosce. (%s) !<br>Contatta l'Assistenza Tecnica.": "🚫 Ti è stato rifiutato l'accesso. Probabilmente l'username con cui ti sei registrato non ti conosce. (%s) !<br>Contatta l'Assistenza Tecnica.",
|
||||
"🚫 %s ha rifiutato l'accesso alla App a %s !": "🚫 %s ha rifiutato l'accesso alla App a %s !",
|
||||
"✅ Hai Abilitato l'accesso alla App a %s !": "✅ Hai Abilitato l'accesso alla App a %s !"
|
||||
}
|
||||
@@ -2076,22 +2076,33 @@ UserSchema.statics.setFriendsCmd = async function (req, idapp, usernameOrig, use
|
||||
try {
|
||||
if (cmd === shared_consts.FRIENDSCMD.SETTRUST) {
|
||||
|
||||
// Aggiungi alle amicizie
|
||||
await this.setFriendsCmd(req, idapp, usernameOrig, usernameDest,
|
||||
shared_consts.FRIENDSCMD.SETFRIEND, value);
|
||||
|
||||
let msgOrig = '';
|
||||
let msgDest = '';
|
||||
// Aggiorna true se lo accetti e false se non lo accetti
|
||||
const ris = await User.updateOne({ idapp, username: usernameDest },
|
||||
{ $set: { verified_by_aportador: value, trust_modified: new Date() } },
|
||||
{ new: false });
|
||||
|
||||
const msgOrig = i18n.__({ phrase: '✅ %s è stato Abilitato correttamente (da %s)!', locale: userDest.lang }, userDest.username, usernameOrig);
|
||||
const msgDest = i18n.__({ phrase: '✅ Sei stato Abilitato correttamente da %s!', locale: lang }, usernameOrig);
|
||||
if (value) {
|
||||
// Aggiungi alle amicizie
|
||||
await this.setFriendsCmd(req, idapp, usernameOrig, usernameDest,
|
||||
shared_consts.FRIENDSCMD.SETFRIEND, value);
|
||||
|
||||
msgOrig = i18n.__({ phrase: '✅ Hai Abilitato l\'accesso alla App a %s !', locale: userDest.lang }, userDest.username);
|
||||
msgDest = i18n.__({ phrase: '✅ Sei stato Abilitato correttamente da %s!', locale: lang }, usernameOrig);
|
||||
msgAdmin = i18n.__({ phrase: '✅ %s è stato Abilitato correttamente (da %s)!', locale: userDest.lang }, userDest.username, usernameOrig);
|
||||
} else {
|
||||
msgOrig = i18n.__({ phrase: '🚫 Hai rifiutato l\'accesso alla App di RISO da parte di %s!', locale: userDest.lang }, userDest.username);
|
||||
msgDest = i18n.__({ phrase: '🚫 Ti è stato rifiutato l\'accesso. Probabilmente l\'username con cui ti sei registrato non ti conosce. (%s) !<br>Contatta l\'Assistenza Tecnica.', locale: lang }, usernameOrig);
|
||||
msgAdmin = i18n.__({ phrase: '🚫 %s ha rifiutato l\'accesso alla App a %s !', locale: userDest.lang }, usernameOrig, userDest.username);
|
||||
|
||||
}
|
||||
|
||||
await telegrambot.sendMsgTelegram(idapp, usernameOrig, msgOrig);
|
||||
await telegrambot.sendMsgTelegram(idapp, userDest.username, msgDest);
|
||||
|
||||
// Invia questo msg anche all'Admin
|
||||
await telegrambot.sendMsgTelegramToTheAdmin(idapp, msgDest, true);
|
||||
await telegrambot.sendMsgTelegramToTheAdmin(idapp, msgAdmin, true);
|
||||
|
||||
// telegrambot.askConfirmationUser(user.idapp, shared_consts.CallFunz.REGISTRATION, user, '', '', '', '');
|
||||
|
||||
|
||||
@@ -27,6 +27,8 @@ const shared_consts = require('./tools/shared_nodejs');
|
||||
|
||||
const {User} = require('./models/user');
|
||||
|
||||
const { MsgTemplate } = require('./models/msg_template');
|
||||
|
||||
const transport_preview = nodemailer.createTransport({
|
||||
jsonTransport: true,
|
||||
});
|
||||
@@ -168,6 +170,9 @@ module.exports = {
|
||||
|
||||
// console.log('idapp', idapp, tools.getNomeAppByIdApp(idapp));
|
||||
|
||||
// ++ estrai l'html da mettere sulla email:
|
||||
// const msghtml = await MsgTemplate.getMsgByLang(idapp, user, shared_consts.TypeMsgTemplate.MSG_BENV_REGISTRATO, user.lang);
|
||||
|
||||
let mylocalsconf = {
|
||||
idapp,
|
||||
dataemail: await this.getdataemail(idapp),
|
||||
|
||||
@@ -411,6 +411,7 @@ module.exports = {
|
||||
TypeMsgTemplate: {
|
||||
MSG_BENVENUTO: 2010,
|
||||
MS_SHARE_LINK: 2000,
|
||||
MSG_BENV_REGISTRATO: 2020,
|
||||
},
|
||||
|
||||
TypeSend: {
|
||||
|
||||
Reference in New Issue
Block a user