InfiniteScroll 3
fix user list send telegram text invited show in profile
This commit is contained in:
@@ -1372,9 +1372,12 @@ UserSchema.statics.getUserProfileByUsername = async function(
|
||||
username_who_report: 1,
|
||||
verified_email: 1,
|
||||
verified_by_aportador: 1,
|
||||
aportador_solidario: 1,
|
||||
date_reg: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.img': 1,
|
||||
"useraport.username": 1,
|
||||
"useraport.profile.img": 1,
|
||||
};
|
||||
|
||||
} else if (perm === tools.Perm.PERM_FRIEND) {
|
||||
@@ -1411,6 +1414,8 @@ UserSchema.statics.getUserProfileByUsername = async function(
|
||||
'profile.born_country': 1,
|
||||
email: 1,
|
||||
date_reg: 1,
|
||||
"useraport.username": 1,
|
||||
"useraport.profile.img": 1,
|
||||
};
|
||||
|
||||
} else if (perm === tools.Perm.PERM_ALL) {
|
||||
@@ -1450,6 +1455,8 @@ UserSchema.statics.getUserProfileByUsername = async function(
|
||||
'comune': 1,
|
||||
email: 1,
|
||||
date_reg: 1,
|
||||
"useraport.username": 1,
|
||||
"useraport.profile.img": 1,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1468,6 +1475,31 @@ UserSchema.statics.getUserProfileByUsername = async function(
|
||||
as: 'mycities',
|
||||
},
|
||||
},
|
||||
{
|
||||
"$lookup": {
|
||||
"from": 'users',
|
||||
let: {
|
||||
"idapp": "$idapp",
|
||||
"user_name": "$aportador_solidario"
|
||||
},
|
||||
pipeline: [
|
||||
{ "$match": {
|
||||
"$expr": {
|
||||
$and: [
|
||||
{ $eq: ['$username', '$$user_name'] },
|
||||
{ $eq: ['$idapp','$$idapp'] }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
as: 'useraport'
|
||||
}
|
||||
},
|
||||
{
|
||||
$unwind:'$useraport'
|
||||
},
|
||||
|
||||
{
|
||||
'$replaceRoot': {
|
||||
'newRoot': {
|
||||
|
||||
Reference in New Issue
Block a user