forked from FoundKeyGang/FoundKey
server: don't return users twice in search
This commit is contained in:
parent
338e898f56
commit
0b7c9095bf
1 changed files with 3 additions and 1 deletions
|
@ -103,6 +103,8 @@ export default define(meta, paramDef, async (ps, me) => {
|
|||
|
||||
const query = Users.createQueryBuilder('user')
|
||||
.where(`user.id IN (${ profQuery.getQuery() })`)
|
||||
// don't show users twice
|
||||
.andWhere('user.id NOT IN (:...ids)', { ids: users.map(user => user.id) })
|
||||
.andWhere(new Brackets(qb => { qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold });
|
||||
|
|
Loading…
Reference in a new issue