-Quando insersci l'username telegram sul Profilo, devo togliergli la chiocciola !
- anche nella ricerca User
This commit is contained in:
@@ -2068,6 +2068,10 @@ module.exports = {
|
||||
data[rec.field] = filter.trim();
|
||||
} else if (rec.type === this.FieldType.string) {
|
||||
data[rec.field] = myregexp;
|
||||
if (rec.field === 'profile.username_telegram') {
|
||||
myregexp = new RegExp(this.rimuoviAtPrimoCarattere(filter).trim().replace(' ', '|'), 'ig');
|
||||
data[rec.field] = myregexp
|
||||
}
|
||||
} else if ((rec.type === this.FieldType.number) ||
|
||||
(rec.type === this.FieldType.hours)) {
|
||||
data[rec.field] = parseFloat(filter.trim());
|
||||
@@ -4813,6 +4817,14 @@ module.exports = {
|
||||
miastr = miastr.replace(/<br>$/, '');
|
||||
|
||||
return miastr;
|
||||
}
|
||||
},
|
||||
|
||||
rimuoviAtPrimoCarattere(stringa) {
|
||||
if (stringa.charAt(0) === '@') {
|
||||
return stringa.slice(1);
|
||||
} else {
|
||||
return stringa;
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user