Update DirectMessageController

This commit is contained in:
Daniel Supernault 2020-11-18 23:12:49 -07:00
parent c12b35f00d
commit 9d07071ee0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -465,7 +465,7 @@ class DirectMessageController extends Controller
public function composeLookup(Request $request)
{
$this->validate($request, [
'q' => 'required|string|min:1|max:50',
'q' => 'required|string|min:2|max:50',
'remote' => 'nullable|boolean',
]);
@ -496,7 +496,8 @@ class DirectMessageController extends Controller
$results = Profile::select('id','domain','username')
->whereNotIn('id', $blocked)
->where('username','like','%'.$q.'%')
->limit(15)
->orderBy('domain')
->limit(8)
->get()
->map(function($r) {
return [