tolta la richiesta di accettazione dei RIS, che ora vengono accettati automaticamente.
This commit is contained in:
@@ -535,7 +535,7 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = async function (recnotif, us
|
||||
|
||||
} else {
|
||||
newdescr = i18n.__('ID_CIRCUIT_COINS_ACCEPTED_FROM_GROUP_TO_YOU', qty, symbol, strtipocontoOrig, myorig, circuitname, username_action)
|
||||
+ `\n` + i18n.__('SALDO_UPDATE', recnotif.paramsObj.extrarec.saldoDest, symbol);
|
||||
+ `\n` + i18n.__('SALDO_UPDATE', recnotif.paramsObj.extrarec.saldoDest, symbol, circuitname);
|
||||
}
|
||||
} else {
|
||||
if (groupOComdest) {
|
||||
|
||||
@@ -3222,27 +3222,28 @@ UserSchema.statics.setCircuitCmd = async function (idapp, usernameOrig, circuitn
|
||||
await tools.sendNotificationByCircuit(idapp, usernameOrig, circuitname, cmd, false, true, username_action, extrarec);
|
||||
|
||||
} else if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REQ) {
|
||||
const onlycheck = false;
|
||||
|
||||
outres = await Circuit.sendCoins(true, idapp, usernameOrig, extrarec);
|
||||
outres = await Circuit.sendCoins(onlycheck, idapp, usernameOrig, extrarec);
|
||||
|
||||
if (outres.cansend) {
|
||||
// Invia una notifica di moneta alla persona
|
||||
const out = await tools.sendNotificationByCircuit(idapp, usernameOrig, circuitname, cmd, false, true, username_action,
|
||||
extrarec);
|
||||
if (out)
|
||||
outres.result = out.ris;
|
||||
//const out = await tools.sendNotificationByCircuit(idapp, usernameOrig, circuitname, cmd, false, true, username_action,
|
||||
// extrarec);
|
||||
//if (out)
|
||||
// outres.result = out.ris;
|
||||
} else {
|
||||
outres.cansend = false;
|
||||
}
|
||||
|
||||
ris = true;
|
||||
} else if ((cmd === shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT) || (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REFUSE)) {
|
||||
// } else if ((cmd === shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT) || (cmd === shared_consts.CIRCUITCMD.SENDCOINS_REFUSE)) {
|
||||
// Before to accept, I see if it's already set !
|
||||
|
||||
outres = {
|
||||
/*outres = {
|
||||
cansend: false,
|
||||
errormsg: '',
|
||||
};
|
||||
}; */
|
||||
|
||||
let outcheck = outres;
|
||||
|
||||
@@ -3254,22 +3255,27 @@ UserSchema.statics.setCircuitCmd = async function (idapp, usernameOrig, circuitn
|
||||
risStatus = i18n.__('STATUS_REFUSED');
|
||||
}
|
||||
// if (!await SendNotif.checkIfCoinsAlreadySent(extrarec.notifId)) {
|
||||
if (!await Movement.checkIfCoinsAlreadySent(extrarec.notifId)) {
|
||||
//if (!await Movement.checkIfCoinsAlreadySent(extrarec.notifId)) {
|
||||
if (true) {
|
||||
if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT) {
|
||||
outcheck = await Circuit.sendCoins(true, idapp, usernameOrig, extrarec);
|
||||
//outcheck = await Circuit.sendCoins(true, idapp, usernameOrig, extrarec);
|
||||
outcheck.cansend = true;
|
||||
outres.cansend = true;
|
||||
} else {
|
||||
outcheck.cansend = true;
|
||||
outres.cansend = true;
|
||||
}
|
||||
|
||||
if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT && outcheck.cansend) {
|
||||
cmd = shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT;
|
||||
|
||||
/*if (cmd === shared_consts.CIRCUITCMD.SENDCOINS_ACCEPT && outcheck.cansend) {
|
||||
if (!await Movement.checkIfCoinsAlreadySent(extrarec.notifId)) {
|
||||
outres = await Circuit.sendCoins(false, idapp, usernameOrig, extrarec);
|
||||
|
||||
} else {
|
||||
outcheck.cansend = false; //GIA INVIATO
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
if (outcheck.cansend) {
|
||||
// Invia una notifica di moneta (accettata o rifiutata) alla persona
|
||||
|
||||
Reference in New Issue
Block a user