mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update DirectMessageController, fix autocomplete bug
This commit is contained in:
parent
29d7514a55
commit
0f00be4d98
1 changed files with 3 additions and 4 deletions
|
@ -390,7 +390,6 @@ class DirectMessageController extends Controller
|
||||||
$min_id = $request->input('min_id');
|
$min_id = $request->input('min_id');
|
||||||
|
|
||||||
$r = Profile::findOrFail($pid);
|
$r = Profile::findOrFail($pid);
|
||||||
// $r = Profile::whereNull('domain')->findOrFail($pid);
|
|
||||||
|
|
||||||
if($min_id) {
|
if($min_id) {
|
||||||
$res = DirectMessage::select('*')
|
$res = DirectMessage::select('*')
|
||||||
|
@ -590,13 +589,13 @@ class DirectMessageController extends Controller
|
||||||
{
|
{
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'q' => 'required|string|min:2|max:50',
|
'q' => 'required|string|min:2|max:50',
|
||||||
'remote' => 'nullable|boolean',
|
'remote' => 'nullable',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$q = $request->input('q');
|
$q = $request->input('q');
|
||||||
$r = $request->input('remote');
|
$r = $request->input('remote', false);
|
||||||
|
|
||||||
if(!Str::of($q)->contains('.')) {
|
if($r && !Str::of($q)->contains('.')) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue