[mastodon-client] Proper user search autocomplete

This commit is contained in:
Laura Hausmann 2023-10-12 21:46:34 +02:00
parent 0e39313ac4
commit da5939d1d6
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -106,7 +106,7 @@ export class SearchHelpers {
query.andWhere(
new Brackets((qb) => {
qb.where("user.name ILIKE :q", { q: `%${sqlLikeEscape(q)}%` });
qb.orWhere("user.usernameLower ILIKE :q", { q: `%${sqlLikeEscape(q)}%` });
qb.orWhere("concat_ws('@', user.usernameLower, user.host) ILIKE :q", { q: `%${sqlLikeEscape(q)}%` });
})
);