diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index b09a3691c6c2..0b0136066d72 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -66,7 +66,7 @@ export default class extends Endpoint { // eslint- qb.where('user.name ILIKE :query', { query: '%' + sqlLikeEscape(ps.query) + '%' }); if (isUsername) { - qb.orWhere('user.usernameLower LIKE :username', { username: sqlLikeEscape(ps.query.replace('@', '').toLowerCase()) + '%' }) + qb.orWhere('user.usernameLower LIKE :username', { username: sqlLikeEscape(ps.query.replace('@', '').toLowerCase()) + '%' }); } else if (this.userEntityService.validateLocalUsername(ps.query)) { // Also search username if it qualifies as username qb.orWhere('user.usernameLower LIKE :username', { username: '%' + sqlLikeEscape(ps.query.toLowerCase()) + '%' }); }