- Versione 1.0.28

- Bottone "Condividi" permette di creare un post Telegram con l'annuncio selezionato.
- migliorata grafica dell'annuncio.
This commit is contained in:
Surya Paolo
2024-02-27 22:08:06 +01:00
parent 3191312372
commit 6ff9922a29
6 changed files with 402 additions and 38 deletions

View File

@@ -204,20 +204,24 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = async function (recnotif, us
}
if (recnotif.typedir === shared_consts.TypeNotifs.TYPEDIR_BACHECA) {
let tablerec = '';
if (recnotif.typeid === shared_consts.TypeNotifs.ID_BACHECA_NEW_GOOD) {
newdescr = i18n.__('NEW_GOOD', userorig, mydescr);
recnotif.openUrl = shared_consts.getDirectoryByTable(shared_consts.TABLES_MYGOODS, true) + myidrec;
tag = 'newgood';
tablerec = 'mygoods';
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_BACHECA_NEW_SERVICE) {
newdescr = i18n.__('NEW_SERVICE', userorig, mydescr);
recnotif.openUrl = shared_consts.getDirectoryByTable(shared_consts.TABLES_MYSKILLS, true) + myidrec;
tag = 'newservice';
tablerec = 'myskills';
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_BACHECA_NEW_HOSP) {
newdescr = i18n.__('NEW_HOSP', userorig, mydescr);
recnotif.openUrl = shared_consts.getDirectoryByTable(shared_consts.TABLES_MYHOSPS, true) + myidrec;
tag = 'newhosp';
tablerec = 'myhosps';
}
let eventobj = await tools.getAnnuncioForTelegram(recnotif.myrectableorig, mydescr, userorig);
let eventobj = await tools.getAnnuncioForTelegram(recnotif.myrectableorig, tablerec, mydescr, userorig, true);
newdescr = eventobj.newdescr;
recnotif.textcontent_Telegram = eventobj.newdescrtelegram;
recnotif.linkaddTelegram = i18n.__('SHOW_POST');