- Nella Lavagna, cliccando sul nome dell'invitato, compaiono le sue informazioni sugli step rimasti, in dettaglio.

- Ogni utente puo' cosi scegliere di regalare un proprio invitato, cliccando sull'invitato, scrivendo l'username del destinatario e premendo il bottone 'Regala Invitato'.
Al destinatario gli arriverà un messaggio sul Bot Telegram che indica che gli è stato regalato un'invitato.
This commit is contained in:
Paolo Arena
2020-02-02 04:06:32 +01:00
parent 512a8c14e2
commit e386d2550b
9 changed files with 150 additions and 32 deletions

View File

@@ -306,7 +306,7 @@ class Telegram {
let mystr = '';
if (rec.user) {
const dashboard = await User.getDashboard(this.idapp, rec.user.aportador_solidario, rec.user.username);
const dashboard = await User.getDashboard(this.idapp, rec.user.aportador_solidario, rec.user.username, rec.user.aportador_solidario_name_surname);
let numpersone = (dashboard.downline) ? dashboard.downline.length : 0;
mystr = "";
@@ -336,12 +336,24 @@ class Telegram {
if (numpersone > 0) {
let index = 1;
dashboard.downline.forEach((user) => {
mystr += emoji.get('star-struck') + ` ${index}°: ${user.username} (${user.name} ${user.surname})\n`;
mystr += emoji.get('star-struck') + ` ${index}°: ${user.name} ${user.surname} (${user.username})\n`;
index++;
});
}
if (dashboard.downnotreg) {
if (dashboard.downnotreg.length > 0) {
mystr += '\n' + emo.QUESTION_MARK + ' ' + tools.get__('NONREG', msg) + ':' + emo.QUESTION_MARK + '\n';
let index = 1;
dashboard.downnotreg.forEach((user) => {
mystr += ` - ${index}°: ${user.name} ${user.surname} (tel: ${user.cell_complete})\n`;
index++;
});
}
}
}
if (!!mystr)
await this.sendMsg(msg.chat.id, mystr);