From b4616d3f3685135ef70e14c52161dfe35539e0e4 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 18 Nov 2023 04:46:51 +0100 Subject: [PATCH] [backend] Don't exclude local user in search-by-username-and-host --- .../server/api/endpoints/users/search-by-username-and-host.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index cb835252a..0b7cdb90f 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -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())}%`,