1
0
Эх сурвалжийг харах

Merge pull request #2902 from pixelfed/staging

Staging
daniel 3 жил өмнө
parent
commit
35de09dcf3

+ 1 - 0
CHANGELOG.md

@@ -106,6 +106,7 @@
 - Updated InstanceCrawlPipeline, remove unused variable. ([e73cf531](https://github.com/pixelfed/pixelfed/commit/e73cf531))
 - 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 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 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/))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 
 ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
 ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)

+ 3 - 4
app/Http/Controllers/DirectMessageController.php

@@ -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 [];
 		}
 		}