code tweak
This commit is contained in:
parent
cb063acd98
commit
a2ec2e9715
|
@ -54,7 +54,7 @@ final class Msg(
|
|||
def search(q: String) =
|
||||
Auth { ctx => me =>
|
||||
ctx.hasInbox ?? {
|
||||
q.trim.some.filter(_.length > 1).filter(lila.user.User.couldBeUsername) match {
|
||||
q.trim.some.filter(lila.user.User.couldBeUsername) match {
|
||||
case None => env.msg.json.searchResult(me)(env.msg.search.empty) map { Ok(_) }
|
||||
case Some(q) => env.msg.search(me, q) flatMap env.msg.json.searchResult(me) map { Ok(_) }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue