1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-02 16:58:49 +09:00

[API] Improve inteligence

This commit is contained in:
syuilo 2017-06-14 03:42:16 +09:00
parent 011742fdc9
commit e7a7ebc1af

View File

@ -42,7 +42,7 @@ async function byNative(res, rej, me, query, offset, max) {
const users = await User const users = await User
.find({ .find({
$or: [{ $or: [{
username_lower: new RegExp(escapedQuery.toLowerCase()) username_lower: new RegExp(escapedQuery.replace('@', '').toLowerCase())
}, { }, {
name: new RegExp(escapedQuery) name: new RegExp(escapedQuery)
}] }]