Quellcode durchsuchen

Merge pull request #4740 from pixelfed/staging

Update ApiV1Controller, fix mutes in home feed
daniel vor 1 Jahr
Ursprung
Commit
1bdd0b3609
2 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 1 0
      CHANGELOG.md
  2. 6 0
      app/Http/Controllers/Api/ApiV1Controller.php

+ 1 - 0
CHANGELOG.md

@@ -44,6 +44,7 @@
 - Update LikePipeline, dispatch to feed queue. Fixes ([#4723](https://github.com/pixelfed/pixelfed/issues/4723)) ([da510089](https://github.com/pixelfed/pixelfed/commit/da510089))
 - Update AccountImport ([5a2d7e3e](https://github.com/pixelfed/pixelfed/commit/5a2d7e3e))
 - Update ImportPostController, fix IG bug with missing spaces between hashtags ([9c24157a](https://github.com/pixelfed/pixelfed/commit/9c24157a))
+- Update ApiV1Controller, fix mutes in home feed ([ddc21714](https://github.com/pixelfed/pixelfed/commit/ddc21714))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 ## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)

+ 6 - 0
app/Http/Controllers/Api/ApiV1Controller.php

@@ -2155,6 +2155,12 @@ class ApiV1Controller extends Controller
 			return $following->push($pid)->toArray();
 		});
 
+		$muted = UserFilterService::mutes($pid);
+
+		if($muted && count($muted)) {
+			$following = array_diff($following, $muted);
+		}
+
 		if($min || $max) {
 			$dir = $min ? '>' : '<';
 			$id = $min ?? $max;