- Aggiornato node.js alla versione 22.18.1
- Aggiornato tutti i pacchetti del server all'ultima versione. - passato mongoose da versione 5 a versione 6
This commit is contained in:
@@ -679,7 +679,7 @@ const txt_pt = {
|
||||
MSG_EXIT_TELEGRAM: 'A conta foi agora desconectada deste Telegrama BOT.',
|
||||
MSG_APORTADOR_USER_REGISTERED: emo.FIRE +
|
||||
' Acabou de se registar "%s (n. %s)"\n(Convidado por %s)',
|
||||
MSG_APORTADOR_ASK_CONFIRM: '🆕💥 🧍♂️ %s si sta registrando su %s e ti chiede di poter entrare. Confermi di conoscerla ?',
|
||||
MSG_APORTADOR_ASK_CONFIRM: '🆕💥 🧍♂️ %s si sta registrando su %s e ti chiede di poter entrare. Confermi di conoscerla ?',
|
||||
MSG_ACCEPT_NEWENTRY_INGROUP: '❇️👥 🧍♂️ Accetta Ingresso nel GRUPPO %s:',
|
||||
MSG_APORTADOR_CONFIRMED: '✅ %s è stato Ammesso correttamente (da %s)!',
|
||||
MSG_APORTADOR_DEST_CONFIRMED: '✅ Sei stato Ammesso correttamente da %s!',
|
||||
@@ -4012,27 +4012,23 @@ class Telegram {
|
||||
if (opt && opt.img) {
|
||||
if (false) {
|
||||
opt.img = 'https://riso.app/upload/profile/paoloar77/mybachecas/Fermentazione-Ruello-sito.png';
|
||||
//opt.img = 'https://riso.app/upload/profile/paoloar77/mybachecas/Fermentazione-Ruello-sito.jpg';
|
||||
// opt.img = 'https://riso.app/upload/profile/SoniaVioletFlame/myskills/1000133092.jpg';
|
||||
}
|
||||
opt.img = tools.fixUrl(opt.img, opt.idapp);
|
||||
console.log('opt.img', opt.img)
|
||||
risSendPhoto = await this.sendImageToTelegram(id, opt.img, { caption: text, ...form });
|
||||
/*return this.bot.sendPhoto(id, opt.img, { caption: text, ...form }).catch((e) => {
|
||||
let blocked = false;
|
||||
if ((e.message.indexOf('Forbidden') > 0) ||
|
||||
(e.message.indexOf('chat not found') > 0)) {
|
||||
blocked = true;
|
||||
}
|
||||
if (!blocked) {
|
||||
console.error(e.message);
|
||||
}
|
||||
if (blocked) {
|
||||
User.SetTelegramWasBlocked(this.idapp, id);
|
||||
// ++Todo: DA FARE ! local_sendMsgTelegramToTheManagers(this.idapp, addtext + text);
|
||||
}
|
||||
return 0;
|
||||
});*/
|
||||
risSendPhoto = await this.sendImageToTelegram(id, opt.img, { caption: text, ...form })
|
||||
.catch((e) => {
|
||||
let blocked = false;
|
||||
if ((e.message.indexOf('Forbidden') > 0) ||
|
||||
(e.message.indexOf('chat not found') > 0)) {
|
||||
blocked = true;
|
||||
}
|
||||
if (!blocked) {
|
||||
console.error(e.message.substring(0, 200));
|
||||
}
|
||||
if (blocked) {
|
||||
User.SetTelegramWasBlocked(this.idapp, id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (risSendPhoto) {
|
||||
@@ -4046,7 +4042,7 @@ class Telegram {
|
||||
blocked = true;
|
||||
}
|
||||
if (!blocked) {
|
||||
console.error(e.message);
|
||||
console.error(e.message.substring(0, 200));
|
||||
}
|
||||
if (blocked) {
|
||||
User.SetTelegramWasBlocked(this.idapp, id);
|
||||
@@ -4059,7 +4055,11 @@ class Telegram {
|
||||
return risSendPhoto
|
||||
|
||||
} catch (e) {
|
||||
console.error(e, 'text', text);
|
||||
if (e.message.indexOf('OK') === 0) {
|
||||
console.log("INFO INVIAMSG:", e.message);
|
||||
} else {
|
||||
console.error("ERROR INVIAMSG:", e.message, 'text', text.substring(0, 100));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user