Impostato la lingua fissa a ITALIANO: ancora non ci sono le traduzioni e poi qualcosa sul server fa casino (non arrivano le richieste...)

Risolto Bug sui messaggi di registrazione, se l'utente non aveva l'Username Telegram
This commit is contained in:
paoloar77
2022-03-08 01:01:20 +01:00
parent 466fdd597d
commit 82e3ed7175
11 changed files with 209 additions and 96 deletions

View File

@@ -254,10 +254,12 @@ module.exports = {
const mytitle = tools.convertSpecialTags(user, params.title);
const mycontent = tools.convertSpecialTags(user, params.content);
let risult = null;
if (params.sendreally) {
if (tools.isBitActive(params.typesend,
shared_consts.TypeSend.PUSH_NOTIFICATION)) {
tools.sendNotificationToUser(user._id, mytitle, mycontent, params.openUrl, params.openUrl2, params.tag,
risult = tools.sendNotificationToUser(user._id, mytitle, mycontent, params.openUrl, params.openUrl2, params.tag,
params.actions).
then(ris => {
@@ -270,18 +272,27 @@ module.exports = {
const telegid = user.profile.teleg_id;
if (telegid > 0) {
telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, mycontent);
risult = await telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, mycontent);
await tools.snooze(100);
}
}
}
numrec++;
if (params.sendreally) {
if (params.sendreally && risult) {
nummsgsent++;
}
if ((nummsgsent % 100) === 0) {
console.log('Inviati ', nummsgsent, 'messaggi...')
}
}
}
if (nummsgsent > 0) {
console.log('FINE Invio Messaggi ! Inviati Totali: ', nummsgsent, 'su', numrec);
}
return {
numrec,
nummsgsent,