diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b7aefe8b..31e5224de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,7 @@ - Updated InstanceCrawlPipeline, remove unused variable. ([e73cf531](https://github.com/pixelfed/pixelfed/commit/e73cf531)) - Updated StoryComposeController, fix expiry bug. ([7dee8f58](https://github.com/pixelfed/pixelfed/commit/7dee8f58)) - Updated Profile, fix following count bug. ([ee9f0795](https://github.com/pixelfed/pixelfed/commit/ee9f0795)) +- Updated DirectMessageController, fix autocomplete bug. ([0f00be4d](https://github.com/pixelfed/pixelfed/commit/0f00be4d)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0) diff --git a/app/Http/Controllers/DirectMessageController.php b/app/Http/Controllers/DirectMessageController.php index 21bb26745..06e013126 100644 --- a/app/Http/Controllers/DirectMessageController.php +++ b/app/Http/Controllers/DirectMessageController.php @@ -390,7 +390,6 @@ class DirectMessageController extends Controller $min_id = $request->input('min_id'); $r = Profile::findOrFail($pid); -// $r = Profile::whereNull('domain')->findOrFail($pid); if($min_id) { $res = DirectMessage::select('*') @@ -590,13 +589,13 @@ class DirectMessageController extends Controller { $this->validate($request, [ 'q' => 'required|string|min:2|max:50', - 'remote' => 'nullable|boolean', + 'remote' => 'nullable', ]); $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 []; }