Fix user recommendation query (last activity) (#2892)

This commit is contained in:
MeiMei 2018-10-12 13:48:26 +09:00 committed by syuilo
parent 10bb343403
commit 6c35586afc

View File

@ -69,13 +69,10 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
$nin: followingIds.concat(mutedUserIds) $nin: followingIds.concat(mutedUserIds)
}, },
isLocked: { $ne: true }, isLocked: { $ne: true },
$or: [{ lastUsedAt: {
lastUsedAt: { $gte: new Date(Date.now() - ms('7days'))
$gte: new Date(Date.now() - ms('7days')) },
} host: null
}, {
host: null
}]
}, { }, {
limit: limit, limit: limit,
skip: offset, skip: offset,