[backend] Don't exclude local user in search-by-username-and-host

This commit is contained in:
Laura Hausmann 2023-11-18 04:46:51 +01:00
parent 5b672e20af
commit b4616d3f36
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605

View File

@ -79,7 +79,6 @@ export default define(meta, paramDef, async (ps, me) => {
const query = Users.createQueryBuilder("user")
.where(`user.id IN (${followingQuery.getQuery()})`)
.andWhere("user.id != :meId", { meId: me.id })
.andWhere("user.isSuspended = FALSE")
.andWhere("user.usernameLower LIKE :username", {
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,
@ -106,7 +105,6 @@ export default define(meta, paramDef, async (ps, me) => {
if (users.length < ps.limit) {
const otherQuery = await Users.createQueryBuilder("user")
.where(`user.id NOT IN (${followingQuery.getQuery()})`)
.andWhere("user.id != :meId", { meId: me.id })
.andWhere("user.isSuspended = FALSE")
.andWhere("user.usernameLower LIKE :username", {
username: `${sqlLikeEscape(ps.username.toLowerCase())}%`,