optimize party seeking call

This commit is contained in:
Phillip Thelen
2026-01-28 21:00:01 +01:00
parent b97dfdfa83
commit e64428c89e
+5 -2
View File
@@ -1353,6 +1353,8 @@ api.getLookingForParty = {
const seekers = await User
.find({
'auth.blocked': { $ne: true },
'flags.chatRevoked': { $ne: true },
'party.seeking': { $exists: true },
'invitations.party.id': { $exists: false },
'auth.timestamps.loggedin': {
@@ -1360,12 +1362,13 @@ api.getLookingForParty = {
},
})
// eslint-disable-next-line no-multi-str
.select('_id auth.blocked auth.local.username auth.timestamps backer contributor.level \
flags.chatRevoked flags.classSelected inbox.blocks invitations.party items.gear.costume \
.select('_id auth.local.username auth.timestamps backer contributor.level \
flags.classSelected inbox.blocks invitations.party items.gear.costume \
items.gear.equipped loginIncentives party._id preferences.background preferences.chair \
preferences.costume preferences.hair preferences.shirt preferences.size preferences.skin \
preferences.language profile.name stats.buffs stats.class stats.lvl')
.sort('-auth.timestamps.loggedin')
.lean()
.exec();
const filteredSeekers = seekers.filter(seeker => {