- ok
This commit is contained in:
@@ -247,7 +247,8 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = async function (recnotif, us
|
|||||||
recnotif.openUrl = shared_consts.getDirectoryByTable(shared_consts.TABLES_MYBACHECAS, true) + myidrec;
|
recnotif.openUrl = shared_consts.getDirectoryByTable(shared_consts.TABLES_MYBACHECAS, true) + myidrec;
|
||||||
tag = 'newevent';
|
tag = 'newevent';
|
||||||
if (recnotif.typeid === shared_consts.TypeNotifs.ID_EVENTS_NEW_REC) {
|
if (recnotif.typeid === shared_consts.TypeNotifs.ID_EVENTS_NEW_REC) {
|
||||||
let eventobj = await tools.getEventForTelegram(recnotif.myrectableorig, mydescr, userorig);
|
// let eventobj = await tools.getEventForTelegram(recnotif.myrectableorig, mydescr, userorig);
|
||||||
|
let eventobj = await tools.getAnnuncioForTelegram(recnotif.myrectableorig, shared_consts.TABLES_MYBACHECAS, mydescr, userorig, true);
|
||||||
newdescr = eventobj.newdescr;
|
newdescr = eventobj.newdescr;
|
||||||
newdescrtelegram = eventobj.newdescrtelegram;
|
newdescrtelegram = eventobj.newdescrtelegram;
|
||||||
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_EVENTS_SEND_MSG) {
|
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_EVENTS_SEND_MSG) {
|
||||||
@@ -266,7 +267,7 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = async function (recnotif, us
|
|||||||
|
|
||||||
}
|
}
|
||||||
recnotif.textcontent_Telegram = newdescrtelegram;
|
recnotif.textcontent_Telegram = newdescrtelegram;
|
||||||
recnotif.linkaddTelegram = i18n.__('SHOW_POST');
|
// recnotif.linkaddTelegram = i18n.__('SHOW_POST');
|
||||||
|
|
||||||
} else if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS) {
|
} else if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS) {
|
||||||
recnotif.openUrl = '/my/' + sender;
|
recnotif.openUrl = '/my/' + sender;
|
||||||
|
|||||||
@@ -5252,7 +5252,7 @@ module.exports = {
|
|||||||
let status = '';
|
let status = '';
|
||||||
let online = false;
|
let online = false;
|
||||||
let solo_online = false;
|
let solo_online = false;
|
||||||
let writtenby = myrec.username;
|
let writtenby = myrec.profile.username_telegram;
|
||||||
let sitoweb = '';
|
let sitoweb = '';
|
||||||
let contact_phone = '';
|
let contact_phone = '';
|
||||||
let contact_email = '';
|
let contact_email = '';
|
||||||
@@ -5280,6 +5280,11 @@ module.exports = {
|
|||||||
if (myrec.organisedBy) {
|
if (myrec.organisedBy) {
|
||||||
organizedBy = myrec.organisedBy;
|
organizedBy = myrec.organisedBy;
|
||||||
contatto = '';
|
contatto = '';
|
||||||
|
} else {
|
||||||
|
if (myrec.mygrp && myrec.mygrp.title) {
|
||||||
|
organizedBy = myrec.mygrp.title;
|
||||||
|
contatto = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ((myrec.contact_telegram && myrec.contact_telegram.toLowerCase() !== contatto_telegram.toLowerCase()) || !contatto) {
|
if ((myrec.contact_telegram && myrec.contact_telegram.toLowerCase() !== contatto_telegram.toLowerCase()) || !contatto) {
|
||||||
contatto += '\n' + myrec.contact_telegram;
|
contatto += '\n' + myrec.contact_telegram;
|
||||||
@@ -5299,7 +5304,7 @@ module.exports = {
|
|||||||
out += `<strong>${myrec.descr}</strong>\n\n`;
|
out += `<strong>${myrec.descr}</strong>\n\n`;
|
||||||
|
|
||||||
if (datastr)
|
if (datastr)
|
||||||
out += this.addRowTelegram('🗓', 'Data Evento', datastr, true);
|
out += this.addRowTelegram('✨', 'Data Evento', datastr, true);
|
||||||
|
|
||||||
if (cat)
|
if (cat)
|
||||||
out += this.addRowTelegram('⭐️', 'Categoria', cat, true);
|
out += this.addRowTelegram('⭐️', 'Categoria', cat, true);
|
||||||
@@ -5324,24 +5329,25 @@ module.exports = {
|
|||||||
if (incambiodi)
|
if (incambiodi)
|
||||||
out += this.addRowTelegram('⚖️', 'In cambio di', incambiodi, true);
|
out += this.addRowTelegram('⚖️', 'In cambio di', incambiodi, true);
|
||||||
|
|
||||||
if (sitoweb)
|
if (organizedBy) {
|
||||||
out += this.addRowTelegram('🌐', 'Sito Web', sitoweb, true);
|
out += this.addRowTelegram('🏠', 'Organizzato da', organizedBy, true);
|
||||||
|
} else {
|
||||||
|
out += this.addRowTelegram('👤', 'Contatto', contatto, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (contributo)
|
if (contributo)
|
||||||
out += this.addRowTelegram('💰', 'Contributo Richiesto', contributo, true);
|
out += this.addRowTelegram('💰', 'Contributo Richiesto', contributo, true);
|
||||||
|
|
||||||
if (contact_phone) {
|
if (contact_phone || contact_email || sitoweb) {
|
||||||
out += this.addRowTelegram('📞', 'Telefono', contact_phone, true);
|
out += this.addRowTelegram('ℹ️', 'Info',
|
||||||
}
|
(contact_phone ? ('📞 ' + contact_phone + ' ') : '')
|
||||||
if (contact_email) {
|
+ (contact_email ? (' 📨 ' + contact_email + ' ') : '')
|
||||||
out += this.addRowTelegram('📨', 'Email', contact_email, true);
|
+ (sitoweb ? (' 🌐 ' + sitoweb + ' ') : '')
|
||||||
|
, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (organizedBy) {
|
if (writtenby && organizedBy) {
|
||||||
out += this.addRowTelegram('🏠', 'Organizzato da', organizedBy, true);
|
out += this.addRowTelegram('✍️', 'Redatto da', '@' + writtenby, true);
|
||||||
out += this.addRowTelegram('✍️', 'Redatto da', writtenby, true);
|
|
||||||
} else {
|
|
||||||
out += this.addRowTelegram('👤', 'Contatto', contatto, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out += this.addRowTelegram('', `👉🏻 Vedi Annuncio completo su RISO`, url, true, true);
|
out += this.addRowTelegram('', `👉🏻 Vedi Annuncio completo su RISO`, url, true, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user