Improve user search

This commit is contained in:
syuilo
2018-06-17 16:40:18 +09:00
parent 44cd1e9223
commit d692bb3c52
2 changed files with 16 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ async function byNative(res, rej, me, query, offset, max) {
// Search users
const users = await User
.find({
host: null,
$or: [{
usernameLower: new RegExp(escapedQuery.replace('@', '').toLowerCase())
}, {