- menu BOT
- verified_by_aportador
This commit is contained in:
167
filelog.txt
167
filelog.txt
@@ -392,3 +392,170 @@ Mar 15/12 ORE 10:45: USER [Paolo Arena (n.8)]: https://ayni.gifteconomy.app
|
|||||||
Mar 15/12 ORE 10:45: USER [Paolo Arena (n.8)]: https://ayni.gifteconomy.app
|
Mar 15/12 ORE 10:45: USER [Paolo Arena (n.8)]: https://ayni.gifteconomy.app
|
||||||
|
|
||||||
Mar 15/12 ORE 10:46: USER [Paolo Arena (n.8)]: https://ayni.gifteconomy.app
|
Mar 15/12 ORE 10:46: USER [Paolo Arena (n.8)]: https://ayni.gifteconomy.app
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:06: USER [Paolo2 Arena3 (n.undefined)]: extittotelegram
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:06: USER [Paolo2 Arena3 (n.undefined)]: dasdasdasdasd
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:49: USER [Paolo2 Arena2 (n.undefined)]: ciao
|
||||||
|
BOT: Ciao Paolo2!
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:49: USER [Paolo2 Arena2 (n.undefined)]: come stai
|
||||||
|
BOT: Io Benone Grazie! 💓 E tu?
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:49: USER [Paolo2 Arena2 (n.undefined)]: bene grazie
|
||||||
|
BOT: L'importante è trovare Serenità dentro di noi💝
|
||||||
|
Nutrirsi di Sole e Viaggiare il più possibile ! 🏖️
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:49: USER [Paolo2 Arena2 (n.undefined)]: ahahah
|
||||||
|
BOT: 😂😂😂
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:49: USER [Paolo2 Arena2 (n.undefined)]: 😂
|
||||||
|
BOT: 😂😂😂
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:50: USER [Paolo2 Arena2 (n.undefined)]: aiuto
|
||||||
|
BOT: Clicca qui per entrare nella Chat HELP di Supporto
|
||||||
|
|
||||||
|
|
||||||
|
I miei colleghi umani ti aiuteranno a risolvere !
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:50: USER [Paolo2 Arena2 (n.undefined)]: ti amo
|
||||||
|
BOT: Anche IO! 💋🤩💝💙💚
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:50: USER [Paolo2 Arena2 (n.undefined)]: mi ami
|
||||||
|
BOT: Tantissimo! 💋💝💝💝
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:50: USER [Paolo2 Arena2 (n.undefined)]: mi vuoi sposare
|
||||||
|
BOT: No Grazie! Sono per la Libertà a Vita! 😂
|
||||||
|
Ma se vuoi possiamo conoscerci meglio!💃🔥
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:24: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
BOT: http://www.pippo.it
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:24: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
BOT: http://www.pippo.it
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:24: USER [Paolo Arena (n.undefined)]: altra
|
||||||
|
BOT: AAA
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:25: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:27: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:27: USER [Paolo Arena (n.undefined)]: altra
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:30: USER [Paolo Arena (n.undefined)]: altra
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:30: USER [Paolo Arena (n.undefined)]: altra
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:30: USER [Paolo Arena (n.undefined)]: altra
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:30: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:31: USER [Paolo Arena (n.undefined)]: altra
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:31: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:31: USER [Paolo Arena (n.undefined)]: menu1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:31: USER [Paolo Arena (n.undefined)]: 🔑link pippo
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:48: USER [Paolo Arena (n.undefined)]: pagina2
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:49: USER [Paolo Arena (n.undefined)]: pagina2
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:49: USER [Paolo Arena (n.undefined)]: getuserinfo
|
||||||
|
|
||||||
|
Mar 28/12 ORE 15:54: USER [Paolo Arena (n.undefined)]: testo4
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:50: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:52: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:52: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:53: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:58: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 19:59: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:09: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:28: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:54: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:55: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:56: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:57: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:58: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:58: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:58: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 20:59: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:02: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:02: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:02: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:02: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:03: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:03: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:05: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:09: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:09: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:09: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:10: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:10: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:11: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:11: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:14: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:15: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:15: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:16: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:17: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:17: USER [Paolo Arena (n.undefined)]: terza
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:17: USER [Paolo Arena (n.undefined)]: terza2
|
||||||
|
|
||||||
|
Mar 28/12 ORE 21:17: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mar 28/12 ORE 23:14: USER [Paolo Arena (n.undefined)]: testo1
|
||||||
|
|
||||||
|
Mer 29/12 ORE 17:38: USER [Paolo Arena (n.undefined)]: terza2
|
||||||
|
|||||||
@@ -229,3 +229,74 @@ Lun 04/10 ORE 15:32: Cancellazione Evento [Paolo Arena] 'Ciaooooooo 1' (06/10/20
|
|||||||
Lun 04/10 ORE 15:32: Cancellazione Evento [Paolo Arena] 'Ciaooooooo 1' (06/10/2021 Dalle 21:00)
|
Lun 04/10 ORE 15:32: Cancellazione Evento [Paolo Arena] 'Ciaooooooo 1' (06/10/2021 Dalle 21:00)
|
||||||
Lun 04/10 ORE 15:36: Prenotazione Evento [Paolo Arena] 'Evento Secondo' (13/10/2021 Dalle 21:00) (Nuovo)
|
Lun 04/10 ORE 15:36: Prenotazione Evento [Paolo Arena] 'Evento Secondo' (13/10/2021 Dalle 21:00) (Nuovo)
|
||||||
1 partecipanti all'Evento
|
1 partecipanti all'Evento
|
||||||
|
|
||||||
|
Mer 22/12 ORE 23:41: 🔥 Si è appena Registrato "Paolo2 Arena2 (paoloar772) (n. undefined)
|
||||||
|
Mer 22/12 ORE 23:42: 🔥 Si è appena Registrato "Paolo2 Arena2 (paoloar772) (n. undefined)
|
||||||
|
Mer 22/12 ORE 23:43: 🔥 Si è appena Registrato "Paolo2 Arena2 (paoloar772) (n. undefined)
|
||||||
|
Mer 22/12 ORE 23:53: 🔥 Si è appena Registrato "Paolo2 Arena2 (paoloar772) (n. undefined)
|
||||||
|
Mer 29/12 ORE 10:04: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773) (n. undefined)
|
||||||
|
Mer 29/12 ORE 10:09: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773) (n. undefined)
|
||||||
|
Mer 29/12 ORE 10:17: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773) (n. undefined)
|
||||||
|
Mer 29/12 ORE 10:23: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 10:26: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:10: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:20: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:22: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:25: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:26: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:26: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:28: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:29: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:31: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:35: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 15:36: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 16:51: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 16:53: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 16:57: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 16:59: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:01: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:02: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:09: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:16: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:30: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:31: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:31: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:32: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:37: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 17:38: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 18:15: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 18:19: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
|
Mer 29/12 ORE 18:19: [Inviato a Paolo Arena (paoloar77)]:
|
||||||
|
🔥 Si è appena Registrato "Paolo Arena (paoloar773)
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mongodb": "^4.1.2",
|
"mongodb": "^4.1.2",
|
||||||
"mongoose": "^5.13.9",
|
"mongoose": "^5.13.13",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"node-cron": "^3.0.0",
|
"node-cron": "^3.0.0",
|
||||||
"node-emoji": "^1.11.0",
|
"node-emoji": "^1.11.0",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ process.env.LINK_UPDATE_PWD = '/updatepwd';
|
|||||||
process.env.LINK_CHECK_UPDATES = '/checkupdates';
|
process.env.LINK_CHECK_UPDATES = '/checkupdates';
|
||||||
process.env.KEY_APP_ID = 'KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF';
|
process.env.KEY_APP_ID = 'KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF';
|
||||||
|
|
||||||
console.log("Starting Node with : " + file);
|
// console.log("Starting Node with : " + file);
|
||||||
require('dotenv').config({ path: file });
|
require('dotenv').config({ path: file });
|
||||||
|
|
||||||
process.env.DATABASE = process.env.DATABASE || 'FreePlanet';
|
process.env.DATABASE = process.env.DATABASE || 'FreePlanet';
|
||||||
|
|||||||
73
src/server/models/bot.js
Executable file
73
src/server/models/bot.js
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
const mongoose = require('mongoose').set('debug', false);
|
||||||
|
const Schema = mongoose.Schema;
|
||||||
|
|
||||||
|
const tools = require('../tools/general');
|
||||||
|
|
||||||
|
mongoose.Promise = global.Promise;
|
||||||
|
mongoose.level = 'F';
|
||||||
|
|
||||||
|
// Resolving error Unknown modifier: $pushAll
|
||||||
|
mongoose.plugin(schema => {
|
||||||
|
schema.options.usePushEach = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
const BotSchema = new Schema({
|
||||||
|
idapp: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
index: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
riga: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
active: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
lang: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
main: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
visibility: {
|
||||||
|
type: Number, // VISIB_ALL, VISIB_ONLYIF_LOGGED, VISIB_ONLY_ADMIN
|
||||||
|
},
|
||||||
|
date_updated: {
|
||||||
|
type: Date,
|
||||||
|
default: Date.now,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
BotSchema.statics.getFieldsForSearch = function() {
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
|
BotSchema.statics.executeQueryTable = function(idapp, params) {
|
||||||
|
params.fieldsearch = this.getFieldsForSearch();
|
||||||
|
return tools.executeQueryTable(this, idapp, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
BotSchema.statics.findAllIdApp = async function(idapp) {
|
||||||
|
const Bot = this;
|
||||||
|
|
||||||
|
const myfind = {idapp};
|
||||||
|
|
||||||
|
return Bot.find(myfind).sort({page: 1, lang: 1, riga: 1, index: 1});
|
||||||
|
};
|
||||||
|
|
||||||
|
const MyBot = mongoose.model('Bot', BotSchema);
|
||||||
|
|
||||||
|
module.exports = {MyBot};
|
||||||
@@ -135,6 +135,10 @@ const UserSchema = new mongoose.Schema({
|
|||||||
aportador_solidario: { // da cancellare
|
aportador_solidario: { // da cancellare
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
verified_by_aportador: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
aportador_iniziale: {
|
aportador_iniziale: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
@@ -568,6 +572,7 @@ UserSchema.statics.getUserShortDataByUsername = async function(
|
|||||||
deleted: 1,
|
deleted: 1,
|
||||||
sospeso: 1,
|
sospeso: 1,
|
||||||
verified_email: 1,
|
verified_email: 1,
|
||||||
|
verified_by_aportador: 1,
|
||||||
'profile.teleg_id': 1,
|
'profile.teleg_id': 1,
|
||||||
// 'profile.saw_zoom_presentation': 1,
|
// 'profile.saw_zoom_presentation': 1,
|
||||||
'profile.ask_zoom_partecipato': 1,
|
'profile.ask_zoom_partecipato': 1,
|
||||||
@@ -860,6 +865,30 @@ UserSchema.statics.setUserQualified = async function(idapp, username) {
|
|||||||
return !!myrec;
|
return !!myrec;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UserSchema.statics.setVerifiedByAportador = async function(idapp, username, valuebool) {
|
||||||
|
const User = this;
|
||||||
|
|
||||||
|
if (username === undefined)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const myquery = {
|
||||||
|
'idapp': idapp,
|
||||||
|
'username': username,
|
||||||
|
};
|
||||||
|
|
||||||
|
const myrec = await User.findOneAndUpdate(myquery,
|
||||||
|
{$set: {'verified_by_aportador': valuebool}}, {new: false});
|
||||||
|
|
||||||
|
return !!myrec;
|
||||||
|
};
|
||||||
|
|
||||||
|
UserSchema.statics.setVerifiedByAportadorToALL = async function () {
|
||||||
|
|
||||||
|
return User.updateMany({}, {$set: {'verified_by_aportador': true}}, {new: false});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
UserSchema.statics.setUserQualified_2Invitati = async function(
|
UserSchema.statics.setUserQualified_2Invitati = async function(
|
||||||
idapp, username) {
|
idapp, username) {
|
||||||
const User = this;
|
const User = this;
|
||||||
@@ -1506,6 +1535,7 @@ UserSchema.statics.getUsersList = function(idapp) {
|
|||||||
name: 1,
|
name: 1,
|
||||||
surname: 1,
|
surname: 1,
|
||||||
verified_email: 1,
|
verified_email: 1,
|
||||||
|
verified_by_aportador: 1,
|
||||||
made_gift: 1,
|
made_gift: 1,
|
||||||
perm: 1,
|
perm: 1,
|
||||||
email: 1,
|
email: 1,
|
||||||
@@ -2069,6 +2099,7 @@ UserSchema.statics.checkUser = async function(idapp, username) {
|
|||||||
|
|
||||||
return User.findOne({idapp, username}, {
|
return User.findOne({idapp, username}, {
|
||||||
verified_email: 1,
|
verified_email: 1,
|
||||||
|
verified_by_aportador: 1,
|
||||||
'profile.teleg_id': 1,
|
'profile.teleg_id': 1,
|
||||||
'profile.teleg_checkcode': 1,
|
'profile.teleg_checkcode': 1,
|
||||||
}).then((rec) => {
|
}).then((rec) => {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ const {Level} = require('../models/level');
|
|||||||
const Pickup = require('../models/pickup');
|
const Pickup = require('../models/pickup');
|
||||||
const {Newstosent} = require('../models/newstosent');
|
const {Newstosent} = require('../models/newstosent');
|
||||||
const {MyPage} = require('../models/mypage');
|
const {MyPage} = require('../models/mypage');
|
||||||
|
const {MyBot} = require('../models/bot');
|
||||||
const {CalZoom} = require('../models/calzoom');
|
const {CalZoom} = require('../models/calzoom');
|
||||||
const {Gallery} = require('../models/gallery');
|
const {Gallery} = require('../models/gallery');
|
||||||
const {TemplEmail} = require('../models/templemail');
|
const {TemplEmail} = require('../models/templemail');
|
||||||
@@ -275,6 +276,8 @@ function getTableByTableName(tablename) {
|
|||||||
mytable = Gallery;
|
mytable = Gallery;
|
||||||
else if (tablename === 'mypage')
|
else if (tablename === 'mypage')
|
||||||
mytable = MyPage;
|
mytable = MyPage;
|
||||||
|
else if (tablename === 'mybots')
|
||||||
|
mytable = MyBot;
|
||||||
else if (tablename === 'calzoom')
|
else if (tablename === 'calzoom')
|
||||||
mytable = CalZoom;
|
mytable = CalZoom;
|
||||||
else if (tablename === 'templemail')
|
else if (tablename === 'templemail')
|
||||||
@@ -582,6 +585,9 @@ router.patch('/chval', authenticate, async (req, res) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mydata.table === shared_consts.TAB_MYBOTS) {
|
||||||
|
telegrambot.reloadMenuBot(idapp);
|
||||||
|
}
|
||||||
if (mydata.table === shared_consts.TAB_SETTINGS) {
|
if (mydata.table === shared_consts.TAB_SETTINGS) {
|
||||||
if (shared_consts.KEY_TO_CRYPTED.includes(fieldsvalue.key)) {
|
if (shared_consts.KEY_TO_CRYPTED.includes(fieldsvalue.key)) {
|
||||||
fieldsvalue.crypted = true;
|
fieldsvalue.crypted = true;
|
||||||
@@ -629,18 +635,6 @@ router.patch('/chval', authenticate, async (req, res) => {
|
|||||||
//Aggiorna record !
|
//Aggiorna record !
|
||||||
await mytable.findByIdAndUpdate(id, {$set: fieldsvalue});
|
await mytable.findByIdAndUpdate(id, {$set: fieldsvalue});
|
||||||
|
|
||||||
const myfirstrec = await ListaIngresso.findOne(
|
|
||||||
{username: rec.username, ind_order: ind_order_ingr});
|
|
||||||
if (!!myfirstrec) {
|
|
||||||
if (!!myfirstrec._id && !myfirstrec.deleted) {
|
|
||||||
let fieldsv2 = {
|
|
||||||
invitante_username: aportador,
|
|
||||||
};
|
|
||||||
//Aggiorna record !
|
|
||||||
await ListaIngresso.findByIdAndUpdate(
|
|
||||||
myfirstrec._id.toString(), {$set: fieldsv2});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res.send(
|
res.send(
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ async function SendMsgToParam(idapp, params) {
|
|||||||
invia = user.profile.socio;
|
invia = user.profile.socio;
|
||||||
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_SOCIO_RESIDENTE) {
|
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_SOCIO_RESIDENTE) {
|
||||||
invia = user.profile.socioresidente;
|
invia = user.profile.socioresidente;
|
||||||
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_SOCIO_RESIDENTE) {
|
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_CONSIGLIO) {
|
||||||
invia = user.profile.consiglio;
|
invia = user.profile.consiglio;
|
||||||
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_NON_SOCI) {
|
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_NON_SOCI) {
|
||||||
invia = !user.profile.socio;
|
invia = !user.profile.socio;
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ router.post('/', async (req, res) => {
|
|||||||
// nomeaportador_corretto = recextra.aportador_solidario_originale_name_surname;
|
// nomeaportador_corretto = recextra.aportador_solidario_originale_name_surname;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
/*
|
||||||
namesurname_aportador_reg = await User.getNameSurnameByUsername(user.idapp, user.aportador_solidario);
|
namesurname_aportador_reg = await User.getNameSurnameByUsername(user.idapp, user.aportador_solidario);
|
||||||
|
|
||||||
if (recextra && namesurname_aportador_reg !== '' && namesurname_aportador_reg !== nomeaportador_corretto) {
|
if (recextra && namesurname_aportador_reg !== '' && namesurname_aportador_reg !== nomeaportador_corretto) {
|
||||||
@@ -187,46 +188,24 @@ router.post('/', async (req, res) => {
|
|||||||
await telegrambot.sendMsgTelegramToTheManagers(user.idapp, msg);
|
await telegrambot.sendMsgTelegramToTheManagers(user.idapp, msg);
|
||||||
res.status(400).send({ code: server_constants.RIS_CODE_USER_NOT_THIS_APORTADOR, msg: '' });
|
res.status(400).send({ code: server_constants.RIS_CODE_USER_NOT_THIS_APORTADOR, msg: '' });
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
let already_registered = (recextra || user.aportador_solidario === tools.APORTADOR_NONE) && (user.idapp === tools.AYNI);
|
let already_registered = (recextra || user.aportador_solidario === tools.APORTADOR_NONE) && (user.idapp === tools.AYNI);
|
||||||
|
|
||||||
|
|
||||||
// Check if is an other people aportador_solidario
|
// Check if is an other people aportador_solidario
|
||||||
|
|
||||||
if (already_registered) {
|
/*if (already_registered) {
|
||||||
// Check in the extraList if is present!
|
// Check in the extraList if is present!
|
||||||
if (!recextra) {
|
const msg = 'Utente non trovato: ' + user.name + ' ' + user.surname + ' ' + user.profile.nationality + ' ' + user.profile.cell + ' email: ' + user.email + ' username: ' + user.username;
|
||||||
const msg = 'Utente non trovato: ' + user.name + ' ' + user.surname + ' ' + user.profile.nationality + ' ' + user.profile.cell + ' email: ' + user.email + ' username: ' + user.username;
|
console.log('Utente non trovato; ', msg);
|
||||||
console.log('Utente non trovato; ', msg);
|
await telegrambot.sendMsgTelegramToTheManagers(user.idapp, msg);
|
||||||
await telegrambot.sendMsgTelegramToTheManagers(user.idapp, msg);
|
res.status(400).send({
|
||||||
res.status(400).send({
|
code: server_constants.RIS_CODE_USER_EXTRALIST_NOTFOUND,
|
||||||
code: server_constants.RIS_CODE_USER_EXTRALIST_NOTFOUND,
|
msg: 'Controlla se il numero ' + user.profile.cell + ' è corretto.'
|
||||||
msg: 'Controlla se il numero ' + user.profile.cell + ' è corretto.'
|
});
|
||||||
});
|
return 1;
|
||||||
return 1;
|
} */
|
||||||
} else {
|
|
||||||
user.ind_order = recextra.ind_order;
|
|
||||||
user.date_reg = recextra.date_reg;
|
|
||||||
if (recextra.aportador_solidario_name_surname)
|
|
||||||
user.aportador_solidario_nome_completo = recextra.aportador_solidario_name_surname;
|
|
||||||
else
|
|
||||||
user.aportador_solidario_nome_completo = recextra.aportador_solidario_originale_name_surname;
|
|
||||||
|
|
||||||
user.aportador_solidario_ind_order = recextra.aportador_solidario_ind_order;
|
|
||||||
|
|
||||||
user.note = recextra.note;
|
|
||||||
|
|
||||||
if (recextra.is_staff) {
|
|
||||||
user.perm = shared_consts.Permissions.Manager;
|
|
||||||
}
|
|
||||||
if (recextra.username === 'paoloar77') {
|
|
||||||
user.perm = shared_consts.Permissions.Manager + shared_consts.Permissions.Admin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return user.save()
|
return user.save()
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
@@ -701,6 +680,7 @@ async function eseguiDbOp(idapp, mydata, locale) {
|
|||||||
myuser.name = 'U' + myuser.index;
|
myuser.name = 'U' + myuser.index;
|
||||||
myuser.surname = 'Ar' + myuser.index;
|
myuser.surname = 'Ar' + myuser.index;
|
||||||
myuser.verified_email = true;
|
myuser.verified_email = true;
|
||||||
|
myuser.verified_by_aportador = true;
|
||||||
if (myuser.index < 2)
|
if (myuser.index < 2)
|
||||||
myuser.perm = "3";
|
myuser.perm = "3";
|
||||||
myuser.username = "Userna_" + myuser.name;
|
myuser.username = "Userna_" + myuser.name;
|
||||||
@@ -738,6 +718,10 @@ async function eseguiDbOp(idapp, mydata, locale) {
|
|||||||
|
|
||||||
await Hours.correggiHours(idapp);
|
await Hours.correggiHours(idapp);
|
||||||
|
|
||||||
|
} else if (mydata.dbop === 'setVerifiedByAportadorToALL') {
|
||||||
|
|
||||||
|
await User.setVerifiedByAportadorToALL();
|
||||||
|
|
||||||
/*} else if (mydata.dbop === 'visuNave') {
|
/*} else if (mydata.dbop === 'visuNave') {
|
||||||
mystr = await Nave.getNavePos(idapp, parseInt(mydata.riga), parseInt(mydata.col));
|
mystr = await Nave.getNavePos(idapp, parseInt(mydata.riga), parseInt(mydata.col));
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ console.log("DB: " + process.env.DATABASE);
|
|||||||
|
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
||||||
|
let telegrambot = null;
|
||||||
|
|
||||||
const tools = require('./tools/general');
|
const tools = require('./tools/general');
|
||||||
|
|
||||||
require('./models/cfgserver');
|
require('./models/cfgserver');
|
||||||
@@ -69,6 +71,7 @@ myLoad().then(ris => {
|
|||||||
require('./models/mailinglist');
|
require('./models/mailinglist');
|
||||||
require('./models/newstosent');
|
require('./models/newstosent');
|
||||||
require('./models/mypage');
|
require('./models/mypage');
|
||||||
|
require('./models/bot');
|
||||||
require('./models/calzoom');
|
require('./models/calzoom');
|
||||||
const mysql_func = require('./mysql/mysql_func');
|
const mysql_func = require('./mysql/mysql_func');
|
||||||
|
|
||||||
@@ -222,12 +225,11 @@ async function mystart() {
|
|||||||
|
|
||||||
testmsgwebpush();
|
testmsgwebpush();
|
||||||
|
|
||||||
faitest();
|
|
||||||
|
|
||||||
// tools.sendNotifToAdmin('Riparti', 'Riparti');
|
// tools.sendNotifToAdmin('Riparti', 'Riparti');
|
||||||
// sendemail.testemail('2', 'it');
|
// sendemail.testemail('2', 'it');
|
||||||
|
|
||||||
let miapass = 'passpao1pa@1A';
|
let miapass = '';
|
||||||
|
|
||||||
if (miapass !== '') {
|
if (miapass !== '') {
|
||||||
let crypt = tools.cryptdata(miapass);
|
let crypt = tools.cryptdata(miapass);
|
||||||
@@ -242,11 +244,14 @@ async function mystart() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
telegrambot = require('./telegram/telegrambot');
|
||||||
|
|
||||||
await inizia();
|
await inizia();
|
||||||
|
|
||||||
await resetProcessingJob();
|
await resetProcessingJob();
|
||||||
|
|
||||||
|
faitest();
|
||||||
|
|
||||||
|
|
||||||
// ----------------- MAILCHIMP -----
|
// ----------------- MAILCHIMP -----
|
||||||
const querystring = require('querystring');
|
const querystring = require('querystring');
|
||||||
@@ -369,7 +374,6 @@ async function resetProcessingJob() {
|
|||||||
|
|
||||||
async function inizia() {
|
async function inizia() {
|
||||||
|
|
||||||
const telegrambot = require('./telegram/telegrambot');
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
await telegrambot.sendMsgTelegram(tools.FREEPLANET, telegrambot.ADMIN_USER_SERVER, `Ciao ${telegrambot.ADMIN_USER_NAME_SERVER}!`);
|
await telegrambot.sendMsgTelegram(tools.FREEPLANET, telegrambot.ADMIN_USER_SERVER, `Ciao ${telegrambot.ADMIN_USER_NAME_SERVER}!`);
|
||||||
@@ -420,6 +424,43 @@ async function faitest() {
|
|||||||
console.log('ris', ris);
|
console.log('ris', ris);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (false) {
|
||||||
|
|
||||||
|
const { User } = require('./models/user');
|
||||||
|
|
||||||
|
const idapp = tools.FREEPLANET;
|
||||||
|
const idreg = 0;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
const user = await User.findOne({
|
||||||
|
idapp,
|
||||||
|
username: 'paoloar773',
|
||||||
|
});
|
||||||
|
|
||||||
|
user.aportador_solidario = 'paoloar77';
|
||||||
|
|
||||||
|
let mylocalsconf = {
|
||||||
|
idapp,
|
||||||
|
dataemail: null,
|
||||||
|
locale: user.lang,
|
||||||
|
nomeapp: tools.getNomeAppByIdApp(idapp),
|
||||||
|
strlinksito: tools.getHostByIdApp(idapp),
|
||||||
|
strlinkreg: '',
|
||||||
|
username: user.username,
|
||||||
|
name: user.name,
|
||||||
|
surname: user.surname,
|
||||||
|
forgetpwd: tools.getHostByIdApp(idapp) + '/requestresetpwd',
|
||||||
|
emailto: '',
|
||||||
|
user,
|
||||||
|
};
|
||||||
|
|
||||||
|
await telegrambot.notifyToTelegram(telegrambot.phase.REGISTRATION,
|
||||||
|
mylocalsconf);
|
||||||
|
} catch (e) {
|
||||||
|
console.log('error ' + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { app };
|
module.exports = { app };
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const printf = require('util').format;
|
|||||||
const { User } = require('../models/user');
|
const { User } = require('../models/user');
|
||||||
const { CalZoom } = require('../models/calzoom');
|
const { CalZoom } = require('../models/calzoom');
|
||||||
const { Nave } = require('../models/nave');
|
const { Nave } = require('../models/nave');
|
||||||
|
const { MyBot } = require('../models/bot');
|
||||||
const shared_consts = require('../tools/shared_nodejs');
|
const shared_consts = require('../tools/shared_nodejs');
|
||||||
|
|
||||||
const { ListaIngresso } = require('../models/listaingresso');
|
const { ListaIngresso } = require('../models/listaingresso');
|
||||||
@@ -70,8 +71,6 @@ const emo = {
|
|||||||
|
|
||||||
|
|
||||||
MsgBot = {
|
MsgBot = {
|
||||||
MIANAVE: ['Nave'],
|
|
||||||
|
|
||||||
CIAO: ['ciao', 'ciaoo', 'hola', 'holaa', 'hey', 'salve', 'buongiorno', 'buondi', 'ciao ❤️'],
|
CIAO: ['ciao', 'ciaoo', 'hola', 'holaa', 'hey', 'salve', 'buongiorno', 'buondi', 'ciao ❤️'],
|
||||||
CI_SEI: ['ci sei', 'c\'è qualcuno', 'c\'è nessuno'],
|
CI_SEI: ['ci sei', 'c\'è qualcuno', 'c\'è nessuno'],
|
||||||
CHI_SONO_IO: ['chi sono io', 'chi sono'],
|
CHI_SONO_IO: ['chi sono io', 'chi sono'],
|
||||||
@@ -92,7 +91,7 @@ MsgBot = {
|
|||||||
SPOSAMI: ['sposami', 'vuoi sposar', 'sei sposat', 'ci sposiamo', 'ti sposo', 'sei sposat', 'mi sposi'],
|
SPOSAMI: ['sposami', 'vuoi sposar', 'sei sposat', 'ci sposiamo', 'ti sposo', 'sei sposat', 'mi sposi'],
|
||||||
CHE_TEMPO_FA: ['che tempo'],
|
CHE_TEMPO_FA: ['che tempo'],
|
||||||
NON_TROO_INVITATI: ['non trovo invitati', 'non riesco a trovare invitati'],
|
NON_TROO_INVITATI: ['non trovo invitati', 'non riesco a trovare invitati'],
|
||||||
PAROLACCE: ['stronz', 'fanculo'],
|
PAROLACCE: ['stronz', 'fanculo', 'fottiti', 'cagare', 'ammazzat', 'muori', 'cretino', 'stupido'],
|
||||||
COME_SI_CHIAMA: ['come si chiama'],
|
COME_SI_CHIAMA: ['come si chiama'],
|
||||||
PROSSIMO_ZOOM: ['prossimo zoom', 'fare lo zoom', 'gli zoom', 'conferenz', 'zoom'],
|
PROSSIMO_ZOOM: ['prossimo zoom', 'fare lo zoom', 'gli zoom', 'conferenz', 'zoom'],
|
||||||
LAVAGNA: ['lavagna', 'Lavagna', 'LAVAGNA'],
|
LAVAGNA: ['lavagna', 'Lavagna', 'LAVAGNA'],
|
||||||
@@ -107,11 +106,9 @@ MsgBot = {
|
|||||||
FARE_DOMANDA: ['fare una domanda', 'posso farti una domanda'],
|
FARE_DOMANDA: ['fare una domanda', 'posso farti una domanda'],
|
||||||
DIVENTERO_RICCA: ['diventerò ricc'],
|
DIVENTERO_RICCA: ['diventerò ricc'],
|
||||||
MA_ALLORA: ['ma allora'],
|
MA_ALLORA: ['ma allora'],
|
||||||
CHI_E_VISTAR: ['chi è vistar'],
|
|
||||||
CHI_E_PAOLO: ['chi è paolo'],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
MsgRisp = {
|
const MsgRisp = {
|
||||||
CHAT_EMPOWER: 'Entra nella Chat EMPOWER !!!\n' + 'https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g ' + emo.PURPLE_HEART + emo.GIFT_HEART + emo.BLUE_HEART
|
CHAT_EMPOWER: 'Entra nella Chat EMPOWER !!!\n' + 'https://t.me/joinchat/C741mkx5QYXu-kyYCYvA8g ' + emo.PURPLE_HEART + emo.GIFT_HEART + emo.BLUE_HEART
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -141,8 +138,6 @@ function getemojibynumber(number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const strNave = "Nave";
|
|
||||||
|
|
||||||
|
|
||||||
const Menu = {
|
const Menu = {
|
||||||
LANG_IT: emoji.get('flag-it') + ' Italiano',
|
LANG_IT: emoji.get('flag-it') + ' Italiano',
|
||||||
@@ -272,28 +267,6 @@ const MenuNoLogin = {
|
|||||||
// it: { menu: [[Menu.it.LAVAGNA, Menu.it.LINK_CONDIVIDERE], [Menu.it.ZOOM, Menu.it.ASSISTENZA], [Menu.LANG]] },
|
// it: { menu: [[Menu.it.LAVAGNA, Menu.it.LINK_CONDIVIDERE], [Menu.it.ZOOM, Menu.it.ASSISTENZA], [Menu.LANG]] },
|
||||||
// };
|
// };
|
||||||
|
|
||||||
const MenuStandard = {
|
|
||||||
it: { menu: [[Menu.it.LAVAGNA, Menu.it.LINK_CONDIVIDERE], [Menu.it.ZOOM, Menu.it.ASSISTENZA]] },
|
|
||||||
};
|
|
||||||
|
|
||||||
const MenuPerAdmin = {
|
|
||||||
it: { menu: [[Menu.it.LAVAGNA, Menu.it.LINK_CONDIVIDERE], [Menu.it.ZOOM, Menu.it.ASSISTENZA], [Menu.LANG, Menu.ADMIN]] },
|
|
||||||
es: { menu: [[Menu.es.LAVAGNA, Menu.es.LINK_CONDIVIDERE], [Menu.es.ZOOM, Menu.es.ASSISTENZA], [Menu.LANG, Menu.ADMIN]] },
|
|
||||||
fr: { menu: [[Menu.fr.LAVAGNA, Menu.fr.LINK_CONDIVIDERE], [Menu.fr.ZOOM, Menu.fr.ASSISTENZA], [Menu.LANG, Menu.ADMIN]] },
|
|
||||||
si: { menu: [[Menu.si.LAVAGNA, Menu.si.LINK_CONDIVIDERE], [Menu.si.ZOOM, Menu.si.ASSISTENZA], [Menu.LANG, Menu.ADMIN]] },
|
|
||||||
pt: { menu: [[Menu.pt.LAVAGNA, Menu.pt.LINK_CONDIVIDERE], [Menu.pt.ZOOM, Menu.pt.ASSISTENZA], [Menu.LANG, Menu.ADMIN]] },
|
|
||||||
enUs: { menu: [[Menu.enUs.LAVAGNA, Menu.enUs.LINK_CONDIVIDERE], [Menu.enUs.ZOOM, Menu.enUs.ASSISTENZA], [Menu.LANG, Menu.ADMIN]] },
|
|
||||||
};
|
|
||||||
|
|
||||||
const MenuRedirigi = {
|
|
||||||
it: { menu: [[Menu.it.NUOVOSITO]] },
|
|
||||||
es: { menu: [[Menu.it.NUOVOSITO]] },
|
|
||||||
fr: { menu: [[Menu.it.NUOVOSITO]] },
|
|
||||||
si: { menu: [[Menu.it.NUOVOSITO]] },
|
|
||||||
pt: { menu: [[Menu.it.NUOVOSITO]] },
|
|
||||||
enUs: { menu: [[Menu.it.NUOVOSITO]] },
|
|
||||||
};
|
|
||||||
|
|
||||||
const MenuLang = {
|
const MenuLang = {
|
||||||
it: { menu: [[Menu.LANG_IT, Menu.LANG_EN], [Menu.LANG_ES, Menu.LANG_FR], [Menu.LANG_SI, Menu.LANG_PT, Menu.it.INDIETRO]] },
|
it: { menu: [[Menu.LANG_IT, Menu.LANG_EN], [Menu.LANG_ES, Menu.LANG_FR], [Menu.LANG_SI, Menu.LANG_PT, Menu.it.INDIETRO]] },
|
||||||
};
|
};
|
||||||
@@ -308,7 +281,7 @@ const MenuYesNo = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const MenuAdmin = {
|
const MenuAdmin = {
|
||||||
it: { menu: [[Menu.MSGSTAFF, Menu.MSGATUTTI, Menu.it.INDIETRO], [Menu.MSG_NO_7_REQ, Menu.MSG_NO_9_REQ, Menu.NESSUN_IMBARCO_7REQ], [Menu.MSGPAOLO, Menu.MSG_TO_NAVE, Menu.MSG_SI_INVITATI_NO_7REQ_INVITATI]] },
|
it: { menu: [[Menu.MSGSTAFF, Menu.MSGATUTTI, Menu.it.INDIETRO], [Menu.MSGPAOLO]] },
|
||||||
};
|
};
|
||||||
|
|
||||||
const MenuSend = {
|
const MenuSend = {
|
||||||
@@ -338,6 +311,10 @@ const Status = {
|
|||||||
WAITFOR_RISPOSTA: 110,
|
WAITFOR_RISPOSTA: 110,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const Cmd = {
|
||||||
|
VALIDATE_REGISTRATION: 1,
|
||||||
|
};
|
||||||
|
|
||||||
const Destin = {
|
const Destin = {
|
||||||
STAFF: 1,
|
STAFF: 1,
|
||||||
TUTTI: 2,
|
TUTTI: 2,
|
||||||
@@ -348,6 +325,8 @@ const Destin = {
|
|||||||
MSG_TO_NAVE: 7,
|
MSG_TO_NAVE: 7,
|
||||||
NESSUN_IMBARCO_7REQ: 8,
|
NESSUN_IMBARCO_7REQ: 8,
|
||||||
PAOLO: 9,
|
PAOLO: 9,
|
||||||
|
DOMANDA: 10,
|
||||||
|
RISPOSTA: 11,
|
||||||
};
|
};
|
||||||
|
|
||||||
const StatusMSGALL = {
|
const StatusMSGALL = {
|
||||||
@@ -367,10 +346,15 @@ const txt = {
|
|||||||
MSG_VERIFY_CODE: '1. Ora ritorna sul sito:\n%s\n2. Copia il codice di Autenticazione (di 6 cifre) che troverai scritto in alto\n3. Scrivilo (o incollalo) qui sotto come messaggio:',
|
MSG_VERIFY_CODE: '1. Ora ritorna sul sito:\n%s\n2. Copia il codice di Autenticazione (di 6 cifre) che troverai scritto in alto\n3. Scrivilo (o incollalo) qui sotto come messaggio:',
|
||||||
MSG_ERR_VERIFY_CODE: 'Codice di Verifica Errato!' + emo.EXCLAMATION_MARK + '\nControlla sul sito %s e riscrivi il nuovo codice di 6 cifre.',
|
MSG_ERR_VERIFY_CODE: 'Codice di Verifica Errato!' + emo.EXCLAMATION_MARK + '\nControlla sul sito %s e riscrivi il nuovo codice di 6 cifre.',
|
||||||
MSG_VERIFY_OK: emoji.get('grinning') + ' Benvenuto %s! Ti sei correttamente verificato con il BOT. ' + '\nSono il tuo assistente virtuale.\n' +
|
MSG_VERIFY_OK: emoji.get('grinning') + ' Benvenuto %s! Ti sei correttamente verificato con il BOT. ' + '\nSono il tuo assistente virtuale.\n' +
|
||||||
'Continua la guida passo passo tornando sul sito.\n\nQuesta chat ti servirà per vedere velocemente la tua Lavagna e per ricevere Importanti avvisi su come procedere il tuo cammino.\n\nUsa il menu qui sotto per controllare la tua situazione.' + emo.GREEN_HEART,
|
'Questo Bot ti servirà per vedere velocemente la tua Lavagna e per ricevere Importanti avvisi su come procedere il tuo cammino.\n\nUsa il menu qui sotto per controllare la tua situazione.' + emo.GREEN_HEART,
|
||||||
MSG_ERR_UNKNOWN_VERIFY_CODE: 'Errore durante il salvataggio sul Server. Riprovare piú tardi',
|
MSG_ERR_UNKNOWN_VERIFY_CODE: 'Errore durante il salvataggio sul Server. Riprovare piú tardi',
|
||||||
MSG_EXIT_TELEGRAM: 'L\'account è stato ora scollegato da questo Telegram BOT.',
|
MSG_EXIT_TELEGRAM: 'L\'account è stato ora scollegato da questo Telegram BOT.',
|
||||||
MSG_APORTADOR_USER_REGISTERED: emo.FIRE + ' Si è appena Registrato "%s (n. %s)',
|
MSG_APORTADOR_USER_REGISTERED: emo.FIRE + ' Si è appena Registrato "%s',
|
||||||
|
MSG_APORTADOR_ASK_CONFIRM: emo.QUESTION_MARK + ' Si vuole confermare di Conoscere "%s ?',
|
||||||
|
MSG_APORTADOR_CONFIRMED: emo.SUN + ' %s è stato confermato correttamente!',
|
||||||
|
MSG_APORTADOR_DEST_CONFIRMED: emo.SUN + ' Sei stato Verificato correttamente da %s!',
|
||||||
|
MSG_APORTADOR_DEST_NOT_CONFIRMED: emo.EXCLAMATION_MARK + ' Ci dispiace ma non sei stato Verificato correttamente dal tuo invitante %s. Contattalo se lo conosci, oppure trova un altro invitante !',
|
||||||
|
MSG_APORTADOR_NOT_CONFIRMED: emo.EXCLAMATION_MARK + ' %s Non è stato Verificato !',
|
||||||
MSG_ISCRITTO_CONACREIS: emo.FIRE + ' Si è appena Iscritto al Conacreis "%s"',
|
MSG_ISCRITTO_CONACREIS: emo.FIRE + ' Si è appena Iscritto al Conacreis "%s"',
|
||||||
MSG_MSG_SENT: emoji.get('envelope') + ' Messaggi Inviati !',
|
MSG_MSG_SENT: emoji.get('envelope') + ' Messaggi Inviati !',
|
||||||
MSG_MSG_TOSENT: emoji.get('envelope') + ' Messaggi da Inviare',
|
MSG_MSG_TOSENT: emoji.get('envelope') + ' Messaggi da Inviare',
|
||||||
@@ -480,6 +464,9 @@ const txt_pt = {
|
|||||||
|
|
||||||
const TelegramBot = require('node-telegram-bot-api');
|
const TelegramBot = require('node-telegram-bot-api');
|
||||||
|
|
||||||
|
const ADMIN_IDTELEGRAM_TEST = 5022837609; //Perseo
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
ADMIN_IDTELEGRAM_SERVER: '12429864', //Paolo
|
ADMIN_IDTELEGRAM_SERVER: '12429864', //Paolo
|
||||||
@@ -539,17 +526,42 @@ module.exports = {
|
|||||||
NameFrom = await User.getNameSurnameByUsername(mylocalsconf.idapp, userdest) + aportador;
|
NameFrom = await User.getNameSurnameByUsername(mylocalsconf.idapp, userdest) + aportador;
|
||||||
aportador = NameFrom;
|
aportador = NameFrom;
|
||||||
}
|
}
|
||||||
text = printf(getstr(langdest, 'MSG_APORTADOR_USER_REGISTERED'), `${mylocalsconf.user.name} ${mylocalsconf.user.surname} (${mylocalsconf.user.username})`, index);
|
text = printf(getstr(langdest, 'MSG_APORTADOR_USER_REGISTERED'), `${mylocalsconf.user.name} ${mylocalsconf.user.surname} (${mylocalsconf.user.username})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let addtext = "";
|
let addtext = "";
|
||||||
|
let rismsg = null;
|
||||||
|
|
||||||
|
|
||||||
if (!!mylocalsconf.user.aportador_solidario) {
|
if (!!mylocalsconf.user.aportador_solidario) {
|
||||||
addtext = '[Inviato a ' + NameFrom + ']:' + '\n';
|
addtext = '[Inviato a ' + NameFrom + ']:' + '\n';
|
||||||
await this.sendMsgTelegram(mylocalsconf.idapp, userdest, text);
|
rismsg = await this.sendMsgTelegram(mylocalsconf.idapp, userdest, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.sendMsgTelegramToTheManagers(mylocalsconf.idapp, addtext + text);
|
await this.sendMsgTelegramToTheManagers(mylocalsconf.idapp, addtext + text);
|
||||||
|
|
||||||
|
if (phase === this.phase.REGISTRATION) {
|
||||||
|
// Invia richiesta allo Sponsor
|
||||||
|
const domanda = printf(getstr(langdest, 'MSG_APORTADOR_ASK_CONFIRM'),
|
||||||
|
`${mylocalsconf.user.name + ' ' + mylocalsconf.user.surname}`);
|
||||||
|
const msgyes = printf(getstr(langdest, 'MSG_APORTADOR_CONFIRMED'),
|
||||||
|
`${mylocalsconf.user.name + ' ' + mylocalsconf.user.surname}`);
|
||||||
|
const msgNo = printf(getstr(langdest, 'MSG_APORTADOR_NOT_CONFIRMED'),
|
||||||
|
`${mylocalsconf.user.name + ' ' + mylocalsconf.user.surname}`);
|
||||||
|
|
||||||
|
const msgDestyes = printf(getstr(langdest, 'MSG_APORTADOR_DEST_CONFIRMED'),
|
||||||
|
`${mylocalsconf.user.name + ' ' + mylocalsconf.user.surname}`);
|
||||||
|
const msgDestNo = printf(getstr(langdest, 'MSG_APORTADOR_DEST_NOT_CONFIRMED'),
|
||||||
|
`${mylocalsconf.user.name + ' ' + mylocalsconf.user.surname}`);
|
||||||
|
|
||||||
|
const cl = getclTelegByidapp(mylocalsconf.idapp);
|
||||||
|
if (cl) {
|
||||||
|
await cl.createIfNotExist(rismsg);
|
||||||
|
await cl.menumsgDomanda(rismsg, Cmd.VALIDATE_REGISTRATION, Destin.DOMANDA, userdest, '', domanda, msgyes, msgNo, msgDestyes, msgDestNo, mylocalsconf.user.username);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -925,6 +937,15 @@ module.exports = {
|
|||||||
return await cl.sendMsg(idtelegram, text, null, MyForm, message_id, chat_id, ripr_menuPrec)
|
return await cl.sendMsg(idtelegram, text, null, MyForm, message_id, chat_id, ripr_menuPrec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
reloadMenuBot: async function (idapp) {
|
||||||
|
|
||||||
|
const cl = getclTelegByidapp(idapp);
|
||||||
|
if (cl) {
|
||||||
|
return await cl.updateMenuBot();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -1050,6 +1071,12 @@ class Telegram {
|
|||||||
this.bot = bot;
|
this.bot = bot;
|
||||||
this.token = bot.token;
|
this.token = bot.token;
|
||||||
this.arrUsers = [];
|
this.arrUsers = [];
|
||||||
|
this.pagenow = 1;
|
||||||
|
this.pageChange = false;
|
||||||
|
this.menuDb = null;
|
||||||
|
this.menuSaved = {};
|
||||||
|
this.lastid = 0
|
||||||
|
//++
|
||||||
}
|
}
|
||||||
|
|
||||||
async createIfNotExist(msg) {
|
async createIfNotExist(msg) {
|
||||||
@@ -1104,10 +1131,13 @@ class Telegram {
|
|||||||
|
|
||||||
let noanswer = false;
|
let noanswer = false;
|
||||||
|
|
||||||
|
let lang = 'it';
|
||||||
|
|
||||||
const rec = this.getRecInMem(msg);
|
const rec = this.getRecInMem(msg);
|
||||||
let myname = '';
|
let myname = '';
|
||||||
if (rec.user) {
|
if (rec.user) {
|
||||||
myname = rec.user.name + ' ' + rec.user.surname + ' (n.' + rec.user.index + ')';
|
myname = rec.user.name + ' ' + rec.user.surname + ' (n.' + rec.user.index + ')';
|
||||||
|
lang = rec.user.lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rec.statusmsg === Status.WAITFOR_RISPOSTA) {
|
if (rec.statusmsg === Status.WAITFOR_RISPOSTA) {
|
||||||
@@ -1152,8 +1182,13 @@ class Telegram {
|
|||||||
|
|
||||||
rec.msgcodeprec = '';
|
rec.msgcodeprec = '';
|
||||||
|
|
||||||
|
const menusite = await this.isMenuSite(this.idapp, testo, lang, id);
|
||||||
|
|
||||||
if (risp === '') {
|
if (risp === '') {
|
||||||
if (MsgBot.CIAO.includes(testo.replace('!', ''))) {
|
if (menusite) {
|
||||||
|
risp = this.getValueMenu(this.idapp, testo, lang);
|
||||||
|
noanswer = true;
|
||||||
|
} else if (MsgBot.CIAO.includes(testo.replace('!', ''))) {
|
||||||
risp = 'Ciao ';
|
risp = 'Ciao ';
|
||||||
if (rec)
|
if (rec)
|
||||||
if (rec.user)
|
if (rec.user)
|
||||||
@@ -1206,7 +1241,7 @@ class Telegram {
|
|||||||
} else if (MsgBot.TI_AMO.find((rec) => testo.indexOf(rec) > -1)) {
|
} else if (MsgBot.TI_AMO.find((rec) => testo.indexOf(rec) > -1)) {
|
||||||
risp = ' Anche IO! ' + emo.KISS + emo.SMILE_STAR + emo.GIFT_HEART + emo.BLUE_HEART + emo.GREEN_HEART;
|
risp = ' Anche IO! ' + emo.KISS + emo.SMILE_STAR + emo.GIFT_HEART + emo.BLUE_HEART + emo.GREEN_HEART;
|
||||||
} else if (MsgBot.PRINCIPE_AZZURRO.find((rec) => testo.indexOf(rec) > -1)) {
|
} else if (MsgBot.PRINCIPE_AZZURRO.find((rec) => testo.indexOf(rec) > -1)) {
|
||||||
risp = 'Chissà... Forse si!\nAnche se meglio averne un\'altro di scorta, nel caso il Principe non sia disponibile.';
|
risp = 'Chissà... Forse si!\nAnche se meglio averne un altro di scorta, nel caso il Principe non sia disponibile.';
|
||||||
} else if (MsgBot.AIUTO.find((rec) => testo.indexOf(rec) > -1)) {
|
} else if (MsgBot.AIUTO.find((rec) => testo.indexOf(rec) > -1)) {
|
||||||
risp = 'Clicca qui per entrare nella Chat HELP di Supporto\n' + tools.HELP_CHAT + '\n\nI miei colleghi umani ti aiuteranno a risolvere !';
|
risp = 'Clicca qui per entrare nella Chat HELP di Supporto\n' + tools.HELP_CHAT + '\n\nI miei colleghi umani ti aiuteranno a risolvere !';
|
||||||
} else if (MsgBot.SPOSAMI.find((rec) => testo.indexOf(rec) > -1)) {
|
} else if (MsgBot.SPOSAMI.find((rec) => testo.indexOf(rec) > -1)) {
|
||||||
@@ -1277,13 +1312,13 @@ class Telegram {
|
|||||||
|
|
||||||
if (risp !== '') {
|
if (risp !== '') {
|
||||||
rec.numdomande++;
|
rec.numdomande++;
|
||||||
await tools.snooze(600);
|
if (!noanswer) {
|
||||||
this._inviaMsg(id, '[BOT' + emo.ROBOT_FACE + ' scrive]:\n' + risp, keyboard);
|
await tools.snooze(600);
|
||||||
|
risp = '[BOT' + emo.ROBOT_FACE + ' scrive]:\n' + risp
|
||||||
|
}
|
||||||
|
this._inviaMsg(id, risp, keyboard);
|
||||||
|
|
||||||
let strlog = 'USER [' + myname + ']: ' + testo + '\n';
|
let strlog = 'USER [' + myname + ']: ' + testo + '\n';
|
||||||
if (!noanswer) {
|
|
||||||
strlog += 'BOT: ' + risp + '\n';
|
|
||||||
}
|
|
||||||
|
|
||||||
tools.writelog(strlog);
|
tools.writelog(strlog);
|
||||||
}
|
}
|
||||||
@@ -1367,8 +1402,6 @@ class Telegram {
|
|||||||
|
|
||||||
if (this.isSelMenu(msg, msg.text, 'LAVAGNA') || MsgBot.LAVAGNA.find((rec) => msg.text.indexOf(rec) > -1)) {
|
if (this.isSelMenu(msg, msg.text, 'LAVAGNA') || MsgBot.LAVAGNA.find((rec) => msg.text.indexOf(rec) > -1)) {
|
||||||
await this.menuLavagna(msg);
|
await this.menuLavagna(msg);
|
||||||
} else if (msg.text === Menu.MIANAVE || (cmd2 === strNave) || MsgBot.MIANAVE.find((rec) => msg.text.indexOf(rec) > -1)) {
|
|
||||||
await this.menuNave(msg)
|
|
||||||
} else if (this.isSelMenu(msg, msg.text, 'ACCEDI')) {
|
} else if (this.isSelMenu(msg, msg.text, 'ACCEDI')) {
|
||||||
await this.menuAccedi(msg)
|
await this.menuAccedi(msg)
|
||||||
} else if (this.isSelMenu(msg, msg.text, 'LINK_CONDIVIDERE')) {
|
} else if (this.isSelMenu(msg, msg.text, 'LINK_CONDIVIDERE')) {
|
||||||
@@ -1728,6 +1761,12 @@ class Telegram {
|
|||||||
else if (destin === Destin.A_UTENTE) {
|
else if (destin === Destin.A_UTENTE) {
|
||||||
const rec = this.getRecInMem(msg);
|
const rec = this.getRecInMem(msg);
|
||||||
return rec.msgall_username_specifico
|
return rec.msgall_username_specifico
|
||||||
|
} else if (destin === Destin.DOMANDA) {
|
||||||
|
const rec = this.getRecInMem(msg);
|
||||||
|
return rec.msg_username_domanda
|
||||||
|
} else if (destin === Destin.RISPOSTA) {
|
||||||
|
const rec = this.getRecInMem(msg);
|
||||||
|
return rec.msg_username_risposta
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1784,6 +1823,23 @@ class Telegram {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async menumsgDomanda(msg, cmd, dest, username, extraparam, domanda, msgYes, msgNo, destYes, destNo, username_risposta) {
|
||||||
|
const rec = this.getRecInMem(msg);
|
||||||
|
if (rec.user) {
|
||||||
|
rec.msgall_status = StatusMSGALL.CONFIRM;
|
||||||
|
rec.msgall_achi = dest;
|
||||||
|
rec.extraparam = extraparam;
|
||||||
|
rec.cmd_to_set = cmd;
|
||||||
|
rec.msg_username_domanda = username;
|
||||||
|
rec.msg_username_risposta = username_risposta;
|
||||||
|
rec.msgtosent = msgYes;
|
||||||
|
rec.msgNo = msgNo;
|
||||||
|
rec.msg_toDest_yes = destYes;
|
||||||
|
rec.msg_toDest_no = destNo;
|
||||||
|
return this.ChiediSINO(msg, domanda);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getlink(qualelink) {
|
getlink(qualelink) {
|
||||||
|
|
||||||
if (qualelink === 'website') {
|
if (qualelink === 'website') {
|
||||||
@@ -1851,17 +1907,13 @@ class Telegram {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRecInMemById(id) {
|
getRecInMemById(id) {
|
||||||
return this.arrUsers.find((rec) => rec.id === id);
|
return this.arrUsers.find((rec) => rec.id.toString() === id.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
getRecByUsername(username) {
|
getRecByUsername(username) {
|
||||||
return this.arrUsers.find((rec) => rec.username_bo === username);
|
return this.arrUsers.find((rec) => rec.username_bo === username);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRecInMemById(id) {
|
|
||||||
return this.arrUsers.find((rec) => rec.id === id);
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteRecInMem(msg) {
|
deleteRecInMem(msg) {
|
||||||
this.arrUsers = this.arrUsers.filter((rec) => rec.id !== this.getchatid(msg));
|
this.arrUsers = this.arrUsers.filter((rec) => rec.id !== this.getchatid(msg));
|
||||||
}
|
}
|
||||||
@@ -2000,14 +2052,31 @@ class Telegram {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async setCmdToUsername(rec, username, cmd_to_set, valuebool) {
|
||||||
|
if (cmd_to_set === Cmd.VALIDATE_REGISTRATION) {
|
||||||
|
return await User.setVerifiedByAportador(rec.user.idapp, username, valuebool);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async sendMsgToAll(rec, msg, texttosend, destin) {
|
async sendMsgToAll(rec, msg, texttosend, destin) {
|
||||||
try {
|
try {
|
||||||
if ((texttosend.length < 3) && (destin !== Destin.A_UTENTE)) {
|
if ((texttosend.length < 3) && (destin !== Destin.A_UTENTE)) {
|
||||||
|
// NOTHING
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
let usersall = null;
|
let usersall = null;
|
||||||
if (destin === Destin.A_UTENTE)
|
|
||||||
usersall = await User.getUsersTelegALL(rec.user.idapp, rec.msgall_username_specifico);
|
let myusername = '';
|
||||||
|
if (destin === Destin.A_UTENTE) {
|
||||||
|
myusername = rec.msgall_username_specifico;
|
||||||
|
} else if (destin === Destin.DOMANDA) {
|
||||||
|
myusername = rec.msg_username_domanda;
|
||||||
|
} else if (destin === Destin.RISPOSTA) {
|
||||||
|
myusername = rec.msg_username_risposta;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (myusername)
|
||||||
|
usersall = await User.getUsersTelegALL(rec.user.idapp, myusername);
|
||||||
else
|
else
|
||||||
usersall = await User.getUsersTelegALL(rec.user.idapp);
|
usersall = await User.getUsersTelegALL(rec.user.idapp);
|
||||||
|
|
||||||
@@ -2058,6 +2127,10 @@ class Telegram {
|
|||||||
invia = utente.username === 'paoloar77';
|
invia = utente.username === 'paoloar77';
|
||||||
} else if (destin === Destin.A_UTENTE) {
|
} else if (destin === Destin.A_UTENTE) {
|
||||||
invia = utente.username === rec.msgall_username_specifico;
|
invia = utente.username === rec.msgall_username_specifico;
|
||||||
|
} else if (destin === Destin.DOMANDA) {
|
||||||
|
invia = utente.username === rec.msg_username_domanda;
|
||||||
|
} else if (destin === Destin.RISPOSTA) {
|
||||||
|
invia = utente.username === rec.msg_username_risposta;
|
||||||
} else if (destin === Destin.NO_7_REQ) {
|
} else if (destin === Destin.NO_7_REQ) {
|
||||||
invia = !await User.isUserQualified7(this.idapp, utente.username);
|
invia = !await User.isUserQualified7(this.idapp, utente.username);
|
||||||
} else if (destin === Destin.NO_9_REQ) {
|
} else if (destin === Destin.NO_9_REQ) {
|
||||||
@@ -2150,7 +2223,9 @@ class Telegram {
|
|||||||
await this.sendMsg(msg.chat.id, msgris);
|
await this.sendMsg(msg.chat.id, msgris);
|
||||||
msgris = preparatesto;
|
msgris = preparatesto;
|
||||||
} else {
|
} else {
|
||||||
msgris = nummsgsent + ' ' + getstr(this.getlang(msg), 'MSG_MSG_SENT');
|
if (destin !== Destin.DOMANDA && destin !== Destin.RISPOSTA) {
|
||||||
|
msgris = nummsgsent + ' ' + getstr(this.getlang(msg), 'MSG_MSG_SENT');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (destin === Destin.A_UTENTE) {
|
if (destin === Destin.A_UTENTE) {
|
||||||
@@ -2161,8 +2236,10 @@ class Telegram {
|
|||||||
await this.sendMsg(msg.chat.id, 'Utente ' + rec.msgall_username_specifico + ' non presente sul BOT !');
|
await this.sendMsg(msg.chat.id, 'Utente ' + rec.msgall_username_specifico + ' non presente sul BOT !');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tools.writeEventsLog(msgris);
|
if (msgris) {
|
||||||
await this.sendMsg(msg.chat.id, msgris);
|
tools.writeEventsLog(msgris);
|
||||||
|
await this.sendMsg(msg.chat.id, msgris);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rec.start_write_msgall = false;
|
rec.start_write_msgall = false;
|
||||||
@@ -2219,7 +2296,24 @@ class Telegram {
|
|||||||
// Take msg to send to ALL
|
// Take msg to send to ALL
|
||||||
await this.sendMsgToAll(rec, msg, rec.msgtosent, rec.msgall_achi)
|
await this.sendMsgToAll(rec, msg, rec.msgtosent, rec.msgall_achi)
|
||||||
} else {
|
} else {
|
||||||
this.sendMsg(msg.chat.id, getstr(this.getlang(msg), 'MSG_OPERAZ_ANNULLATA'));
|
let msgout = rec.msgNo;
|
||||||
|
if (!msgout)
|
||||||
|
msgout = getstr(this.getlang(msg), 'MSG_OPERAZ_ANNULLATA');
|
||||||
|
this.sendMsg(msg.chat.id, msgout);
|
||||||
|
}
|
||||||
|
if (rec.msgall_achi === Destin.DOMANDA) {
|
||||||
|
if (rec.msg_toDest_yes) {
|
||||||
|
rec.msgall_achi = Destin.RISPOSTA;
|
||||||
|
if (this.isSelMenu(msg, msg.text, 'SI')) {
|
||||||
|
const ris = await this.setCmdToUsername(rec, rec.msg_username_risposta, rec.cmd_to_set, true);
|
||||||
|
if (ris) {
|
||||||
|
await this.sendMsgToAll(rec, msg, rec.msg_toDest_yes, rec.msgall_achi);
|
||||||
|
}
|
||||||
|
} else if (this.isSelMenu(msg, msg.text, 'NO')) {
|
||||||
|
const ris = await this.setCmdToUsername(rec, rec.msg_username_risposta, rec.cmd_to_set, false);
|
||||||
|
await this.sendMsgToAll(rec, msg, rec.msg_toDest_no, rec.msgall_achi);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
rec.msgall_status = StatusMSGALL.NONE;
|
rec.msgall_status = StatusMSGALL.NONE;
|
||||||
normale = false;
|
normale = false;
|
||||||
@@ -2230,17 +2324,25 @@ class Telegram {
|
|||||||
const cmd = rec.msgtosent.toLowerCase();
|
const cmd = rec.msgtosent.toLowerCase();
|
||||||
let achi = this.getDestinStr(msg, rec.msgall_achi, rec);
|
let achi = this.getDestinStr(msg, rec.msgall_achi, rec);
|
||||||
let domanda = '';
|
let domanda = '';
|
||||||
if (cmd === CONTA_SOLO)
|
if (rec.msgall_domanda) {
|
||||||
domanda = 'Confermi di vedere a quante persone arriverebbe questo messaggio, a ' + achi + ' ?\n' + rec.msgtosent;
|
domanda = rec.msgall_domanda;
|
||||||
else if (cmd === RICEVI_EMAIL)
|
} else {
|
||||||
domanda = 'Confermi di vedere la lista delle email di ' + achi + '?';
|
if (cmd === CONTA_SOLO)
|
||||||
else if (cmd === NOME_COGNOME)
|
domanda = 'Confermi di vedere a quante persone arriverebbe questo messaggio, a ' +
|
||||||
domanda = 'Confermi di vedere la lista di persone ' + achi + '?';
|
achi + ' ?\n' + rec.msgtosent;
|
||||||
else {
|
else if (cmd === RICEVI_EMAIL)
|
||||||
if (rec.msgall_achi === Destin.A_UTENTE)
|
domanda = 'Confermi di vedere la lista delle email di ' + achi +
|
||||||
domanda = 'Confermi d\'Iniziare una Chat messaggi con ' + achi + ' ?\n' + rec.msgtosent;
|
'?';
|
||||||
else
|
else if (cmd === NOME_COGNOME)
|
||||||
domanda = 'Confermi d\'Inviare questo messaggio a ' + achi + ' ?\n' + rec.msgtosent;
|
domanda = 'Confermi di vedere la lista di persone ' + achi + '?';
|
||||||
|
else {
|
||||||
|
if (rec.msgall_achi === Destin.A_UTENTE)
|
||||||
|
domanda = 'Confermi d\'Iniziare una Chat messaggi con ' + achi +
|
||||||
|
' ?\n' + rec.msgtosent;
|
||||||
|
else
|
||||||
|
domanda = 'Confermi d\'Inviare questo messaggio a ' + achi +
|
||||||
|
' ?\n' + rec.msgtosent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ChiediSINO(msg, domanda);
|
this.ChiediSINO(msg, domanda);
|
||||||
@@ -2326,6 +2428,12 @@ class Telegram {
|
|||||||
return !!rec
|
return !!rec
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateMenuBot() {
|
||||||
|
for (let rec of this.arrUsers) {
|
||||||
|
rec.datemenu_updated = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addUser(msg) {
|
addUser(msg) {
|
||||||
const lang = this.getlang(msg);
|
const lang = this.getlang(msg);
|
||||||
const code = 100000 + Math.round(Math.random() * 899999);
|
const code = 100000 + Math.round(Math.random() * 899999);
|
||||||
@@ -2342,12 +2450,20 @@ class Telegram {
|
|||||||
retry: 0,
|
retry: 0,
|
||||||
username_bo: '',
|
username_bo: '',
|
||||||
msgall_status: StatusMSGALL.NONE,
|
msgall_status: StatusMSGALL.NONE,
|
||||||
|
msgall_domanda: '',
|
||||||
msgall_achi: 0,
|
msgall_achi: 0,
|
||||||
msgall_username_specifico: '',
|
msgall_username_specifico: '',
|
||||||
|
cmd_to_set: 0,
|
||||||
|
msg_username_domanda: '',
|
||||||
|
msg_username_risposta: '',
|
||||||
extraparam: '',
|
extraparam: '',
|
||||||
msgtosent: '',
|
msgtosent: '',
|
||||||
|
msgNo: '',
|
||||||
|
msg_toDest_yes: '',
|
||||||
|
msg_toDest_no: '',
|
||||||
msg_wait: false,
|
msg_wait: false,
|
||||||
lastmenu: null,
|
lastmenu: null,
|
||||||
|
datemenu_updated: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.arrUsers.push(rec);
|
this.arrUsers.push(rec);
|
||||||
@@ -2362,21 +2478,129 @@ class Telegram {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getKeyboard(id, menu, lang) {
|
async loadMenuFromDb(idapp, id) {
|
||||||
let keyb = MenuStandard;
|
try {
|
||||||
|
let load = false;
|
||||||
|
const check = true;
|
||||||
|
|
||||||
if (this.idapp === tools.AYNI) {
|
const recuser = this.getRecInMemById(id);
|
||||||
keyb = MenuRedirigi
|
if (recuser) {
|
||||||
}
|
if (!recuser.datemenu_updated)
|
||||||
// Check if you are Admin
|
load = true
|
||||||
const ismanager = await User.isAdminByIdTeleg(this.idapp, id);
|
|
||||||
if (ismanager && menu !== MenuChat)
|
|
||||||
keyb = MenuPerAdmin;
|
|
||||||
if (this.idapp === tools.AYNI) {
|
|
||||||
keyb = MenuRedirigi
|
|
||||||
}
|
}
|
||||||
|
if (check) {
|
||||||
|
if (!(this.menuSaved[idapp]))
|
||||||
|
load = true;
|
||||||
|
}
|
||||||
|
if (load || !this.menuDb || this.pageChange) {
|
||||||
|
|
||||||
|
// Check if you are Admin
|
||||||
|
const user = await User.UserByIdTelegram(idapp, id);
|
||||||
|
let isAdmin = user ? user.profile.manage_telegram && user.username === 'paoloar77' : false
|
||||||
|
const isManager = user ? user.profile.manage_telegram : false
|
||||||
|
const isVerified = user ? user.profile.teleg_id > 0 && user.verified_email && user.verified_by_aportador : false;
|
||||||
|
|
||||||
|
this.menuDb = await MyBot.findAllIdApp(idapp);
|
||||||
|
|
||||||
|
let arrlang = {}
|
||||||
|
|
||||||
|
let riga = 0;
|
||||||
|
let arrtemp = [];
|
||||||
|
let lang = '';
|
||||||
|
|
||||||
|
for (const rec of this.menuDb) {
|
||||||
|
if (rec.active && rec.main && rec.page === this.pagenow
|
||||||
|
&& ((isAdmin && tools.isBitActive(rec.visibility, shared_consts.VISIB_ONLY_ADMIN))
|
||||||
|
|| (isManager && tools.isBitActive(rec.visibility, shared_consts.VISIB_ONLY_MANAGER))
|
||||||
|
|| (isVerified && tools.isBitActive(rec.visibility, shared_consts.VISIB_ONLYIF_LOGGED))
|
||||||
|
|| (rec.visibility === 0))
|
||||||
|
) {
|
||||||
|
lang = rec.lang;
|
||||||
|
if (!arrlang[rec.lang])
|
||||||
|
arrlang[rec.lang] = {menu: []}
|
||||||
|
|
||||||
|
if (riga !== rec.riga) {
|
||||||
|
if (arrtemp.length > 0)
|
||||||
|
arrlang[rec.lang].menu.push(arrtemp);
|
||||||
|
|
||||||
|
riga = rec.riga;
|
||||||
|
arrtemp = []
|
||||||
|
}
|
||||||
|
|
||||||
|
arrtemp.push(rec.label);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (arrtemp.length > 0)
|
||||||
|
arrlang[lang].menu.push(arrtemp);
|
||||||
|
|
||||||
|
if (recuser)
|
||||||
|
recuser.datemenu_updated = new Date();
|
||||||
|
|
||||||
|
this.pageChange = false;
|
||||||
|
this.menuSaved[idapp] = arrlang;
|
||||||
|
}
|
||||||
|
return this.menuSaved[idapp];
|
||||||
|
} catch (e) {
|
||||||
|
console.log('Err loadMenuFromDb: ' + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async isMenuSite(idapp, testo, lang, id) {
|
||||||
|
try {
|
||||||
|
// Check if Reload
|
||||||
|
const recuser = await this.getRecInMemById(id);
|
||||||
|
if (recuser) {
|
||||||
|
if (!recuser.datemenu_updated) {
|
||||||
|
await this.loadMenuFromDb(this.idapp, id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const rec of this.menuDb) {
|
||||||
|
if (rec.idapp === idapp && rec.lang === lang && rec.label.toLowerCase() === testo) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
getValueMenu(idapp, testo, lang) {
|
||||||
|
try {
|
||||||
|
for (const rec of this.menuDb) {
|
||||||
|
if (rec.idapp === idapp && rec.lang === lang && rec.label.toLowerCase() === testo) {
|
||||||
|
if (rec.type === shared_consts.BOTTYPE_TEXT) {
|
||||||
|
return rec.value;
|
||||||
|
}
|
||||||
|
if (rec.type === shared_consts.BOTTYPE_PAGE) {
|
||||||
|
if (tools.isNumber(rec.value)) {
|
||||||
|
this.pagenow = parseInt(rec.value);
|
||||||
|
this.pageChange = true;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
} catch (e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
async getKeyboard(id, menu, lang) {
|
||||||
|
let keyb = null;
|
||||||
|
|
||||||
|
this.lastid = id
|
||||||
|
|
||||||
if (menu) {
|
if (menu) {
|
||||||
keyb = menu
|
keyb = menu
|
||||||
|
} else {
|
||||||
|
keyb = await this.loadMenuFromDb(this.idapp, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mykeyb = undefined;
|
let mykeyb = undefined;
|
||||||
@@ -2405,7 +2629,8 @@ class Telegram {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (process.env.LOCALE === "1") {
|
if (process.env.LOCALE === "1") {
|
||||||
id = '12429864';
|
if (id !== ADMIN_IDTELEGRAM_TEST)
|
||||||
|
id = '12429864';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!!msg_id) {
|
if (!!msg_id) {
|
||||||
@@ -2461,7 +2686,7 @@ class Telegram {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const res = await this.bot.sendMessage(id, text, form)
|
return this.bot.sendMessage(id, text, form)
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
let blocked = false;
|
let blocked = false;
|
||||||
if ((e.message.indexOf('Forbidden') > 0) || (e.message.indexOf('chat not found') > 0)) {
|
if ((e.message.indexOf('Forbidden') > 0) || (e.message.indexOf('chat not found') > 0)) {
|
||||||
@@ -2476,8 +2701,6 @@ class Telegram {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
return res;
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
return 0
|
return 0
|
||||||
@@ -2520,7 +2743,8 @@ class Telegram {
|
|||||||
try {
|
try {
|
||||||
mymenuout = mymenu[lang].menu;
|
mymenuout = mymenu[lang].menu;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
mymenuout = mymenu['it'].menu;
|
if (!!mymenu['it'])
|
||||||
|
mymenuout = mymenu['it'].menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mymenuout;
|
return mymenuout;
|
||||||
|
|||||||
@@ -1134,9 +1134,15 @@ module.exports = {
|
|||||||
if (params.filterand.includes(
|
if (params.filterand.includes(
|
||||||
shared_consts.FILTER_USER_CODICE_AUTH_TELEGRAM))
|
shared_consts.FILTER_USER_CODICE_AUTH_TELEGRAM))
|
||||||
filtriadded.push({'profile.teleg_checkcode': {$gt: 1}});
|
filtriadded.push({'profile.teleg_checkcode': {$gt: 1}});
|
||||||
if (params.filterand.includes(
|
if (params.filterand.includes(shared_consts.FILTER_USER_NO_EMAIL_VERIFICATA))
|
||||||
shared_consts.FILTER_USER_NO_EMAIL_VERIFICATA))
|
|
||||||
filtriadded.push({verified_email: false});
|
filtriadded.push({verified_email: false});
|
||||||
|
if (params.filterand.includes(shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR))
|
||||||
|
filtriadded.push({
|
||||||
|
$or: [
|
||||||
|
{verified_by_aportador: {$exists: false}},
|
||||||
|
{verified_by_aportador: {$exists: true, $eq: false}}],
|
||||||
|
|
||||||
|
});
|
||||||
if (params.filterand.includes(shared_consts.FILTER_USER_NO_DREAM))
|
if (params.filterand.includes(shared_consts.FILTER_USER_NO_DREAM))
|
||||||
filtriadded.push({
|
filtriadded.push({
|
||||||
'profile.my_dream': {
|
'profile.my_dream': {
|
||||||
@@ -2168,6 +2174,9 @@ module.exports = {
|
|||||||
return mystr.replace(/-/g, '/');
|
return mystr.replace(/-/g, '/');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isNumber(n){
|
||||||
|
return typeof(n) != "boolean" && !isNaN(n) && n;
|
||||||
|
},
|
||||||
getNumObj(obj) {
|
getNumObj(obj) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
for (let properties in obj) {
|
for (let properties in obj) {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ module.exports = {
|
|||||||
FILTER_MISSING_PAYMENT: 262144,
|
FILTER_MISSING_PAYMENT: 262144,
|
||||||
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
|
FILTER_TO_MAKE_MEMBERSHIP_CARD: 524288,
|
||||||
FILTER_MEMBERSHIP_CARD_OK: 1048576,
|
FILTER_MEMBERSHIP_CARD_OK: 1048576,
|
||||||
|
FILTER_USER_NO_VERIFIED_APORTADOR: 2097152,
|
||||||
|
|
||||||
FILTER_MYSKILL_SKILL: 1,
|
FILTER_MYSKILL_SKILL: 1,
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ module.exports = {
|
|||||||
TAB_COUNTRY: 'countries',
|
TAB_COUNTRY: 'countries',
|
||||||
TAB_PHONES: 'phones',
|
TAB_PHONES: 'phones',
|
||||||
TAB_SETTINGS: 'settings',
|
TAB_SETTINGS: 'settings',
|
||||||
|
TAB_MYBOTS: 'mybots',
|
||||||
|
|
||||||
KEY_TO_CRYPTED: ['PWD_FROM'],
|
KEY_TO_CRYPTED: ['PWD_FROM'],
|
||||||
|
|
||||||
@@ -51,10 +53,20 @@ module.exports = {
|
|||||||
|
|
||||||
TABLES_ID_NUMBER: ['permissions', 'levels', 'statusSkills', 'sectors', 'skills', 'cities', 'myskills'],
|
TABLES_ID_NUMBER: ['permissions', 'levels', 'statusSkills', 'sectors', 'skills', 'cities', 'myskills'],
|
||||||
TABLES_USER_ID: ['myskills'],
|
TABLES_USER_ID: ['myskills'],
|
||||||
TABLES_UPDATE_LASTMODIFIED: ['myskills'],
|
TABLES_UPDATE_LASTMODIFIED: ['myskills', 'mybots'],
|
||||||
|
|
||||||
TABLES_PERM_CHANGE_FOR_USERS: ['myskills'],
|
TABLES_PERM_CHANGE_FOR_USERS: ['myskills'],
|
||||||
|
|
||||||
|
VISIB_ALL: 0,
|
||||||
|
VISIB_ONLYIF_VERIFIED: 1,
|
||||||
|
VISIB_ONLY_MANAGER: 2,
|
||||||
|
VISIB_ONLY_ADMIN: 4,
|
||||||
|
|
||||||
|
BOTTYPE_NONE: 0,
|
||||||
|
BOTTYPE_PAGE: 1,
|
||||||
|
BOTTYPE_LINK: 2,
|
||||||
|
BOTTYPE_TEXT: 3,
|
||||||
|
|
||||||
CashType: {
|
CashType: {
|
||||||
None: 0,
|
None: 0,
|
||||||
Incoming: 1,
|
Incoming: 1,
|
||||||
@@ -128,7 +140,7 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
fieldsUserToChange() {
|
fieldsUserToChange() {
|
||||||
return ['_id', 'index', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'ipaddr', 'lasttimeonline', 'profile', 'calcstat', 'news_on', 'aportador_solidario', 'made_gift', 'ind_order', 'old_order', 'numinvitati', 'numinvitatiattivi', 'qualified']
|
return ['_id', 'index', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'verified_by_aportador', 'ipaddr', 'lasttimeonline', 'profile', 'calcstat', 'news_on', 'aportador_solidario', 'made_gift', 'ind_order', 'old_order', 'numinvitati', 'numinvitatiattivi', 'qualified']
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user