- 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;
|
||||
tag = 'newevent';
|
||||
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;
|
||||
newdescrtelegram = eventobj.newdescrtelegram;
|
||||
} 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.linkaddTelegram = i18n.__('SHOW_POST');
|
||||
// recnotif.linkaddTelegram = i18n.__('SHOW_POST');
|
||||
|
||||
} else if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS) {
|
||||
recnotif.openUrl = '/my/' + sender;
|
||||
|
||||
@@ -3800,8 +3800,8 @@ module.exports = {
|
||||
|
||||
},
|
||||
|
||||
getmd5(mystr) {
|
||||
return CryptoJS.MD5(mystr ? mystr.toLowerCase(): '').toString();
|
||||
getmd5(mystr) {
|
||||
return CryptoJS.MD5(mystr ? mystr.toLowerCase() : '').toString();
|
||||
},
|
||||
|
||||
getHash(mystr) {
|
||||
@@ -4639,7 +4639,7 @@ module.exports = {
|
||||
} else if (paramstr === 'DESCRIZ') {
|
||||
description = value;
|
||||
} else if (paramstr === 'SOCK') {
|
||||
sock = (value ? (value.toLowerCase() === 'true'): false);
|
||||
sock = (value ? (value.toLowerCase() === 'true') : false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5252,7 +5252,7 @@ module.exports = {
|
||||
let status = '';
|
||||
let online = false;
|
||||
let solo_online = false;
|
||||
let writtenby = myrec.username;
|
||||
let writtenby = myrec.profile.username_telegram;
|
||||
let sitoweb = '';
|
||||
let contact_phone = '';
|
||||
let contact_email = '';
|
||||
@@ -5273,13 +5273,18 @@ module.exports = {
|
||||
if (myrec.website) {
|
||||
sitoweb = myrec.website
|
||||
}
|
||||
|
||||
|
||||
contact_phone = myrec.contact_phone || '';
|
||||
contact_email = myrec.contact_email || '';
|
||||
|
||||
if (myrec.organisedBy) {
|
||||
organizedBy = myrec.organisedBy;
|
||||
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) {
|
||||
contatto += '\n' + myrec.contact_telegram;
|
||||
@@ -5299,7 +5304,7 @@ module.exports = {
|
||||
out += `<strong>${myrec.descr}</strong>\n\n`;
|
||||
|
||||
if (datastr)
|
||||
out += this.addRowTelegram('🗓', 'Data Evento', datastr, true);
|
||||
out += this.addRowTelegram('✨', 'Data Evento', datastr, true);
|
||||
|
||||
if (cat)
|
||||
out += this.addRowTelegram('⭐️', 'Categoria', cat, true);
|
||||
@@ -5324,24 +5329,25 @@ module.exports = {
|
||||
if (incambiodi)
|
||||
out += this.addRowTelegram('⚖️', 'In cambio di', incambiodi, true);
|
||||
|
||||
if (sitoweb)
|
||||
out += this.addRowTelegram('🌐', 'Sito Web', sitoweb, true);
|
||||
if (organizedBy) {
|
||||
out += this.addRowTelegram('🏠', 'Organizzato da', organizedBy, true);
|
||||
} else {
|
||||
out += this.addRowTelegram('👤', 'Contatto', contatto, true);
|
||||
}
|
||||
|
||||
if (contributo)
|
||||
out += this.addRowTelegram('💰', 'Contributo Richiesto', contributo, true);
|
||||
|
||||
if (contact_phone) {
|
||||
out += this.addRowTelegram('📞', 'Telefono', contact_phone, true);
|
||||
}
|
||||
if (contact_email) {
|
||||
out += this.addRowTelegram('📨', 'Email', contact_email, true);
|
||||
if (contact_phone || contact_email || sitoweb) {
|
||||
out += this.addRowTelegram('ℹ️', 'Info',
|
||||
(contact_phone ? ('📞 ' + contact_phone + ' ') : '')
|
||||
+ (contact_email ? (' 📨 ' + contact_email + ' ') : '')
|
||||
+ (sitoweb ? (' 🌐 ' + sitoweb + ' ') : '')
|
||||
, true);
|
||||
}
|
||||
|
||||
if (organizedBy) {
|
||||
out += this.addRowTelegram('🏠', 'Organizzato da', organizedBy, true);
|
||||
out += this.addRowTelegram('✍️', 'Redatto da', writtenby, true);
|
||||
} else {
|
||||
out += this.addRowTelegram('👤', 'Contatto', contatto, true);
|
||||
if (writtenby && organizedBy) {
|
||||
out += this.addRowTelegram('✍️', 'Redatto da', '@' + writtenby, true);
|
||||
}
|
||||
|
||||
out += this.addRowTelegram('', `👉🏻 Vedi Annuncio completo su RISO`, url, true, true);
|
||||
@@ -5801,7 +5807,7 @@ module.exports = {
|
||||
}
|
||||
if (myurl.startsWith('http://127.0.0.1')) {
|
||||
//myurl = myurl.replace('http://127.0.0.1:8084/', 'https://riso.app/')
|
||||
|
||||
|
||||
// Se è in locale allora metti una foto finta...
|
||||
myurl = 'https://images.unsplash.com/photo-1464047736614-af63643285bf?q=80&w=2874&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'
|
||||
//myurl = myurl.replace('http://127.0.0.1', 'http://localhost')
|
||||
|
||||
Reference in New Issue
Block a user