Browse Source

Update ApiV1Controller, fix mutes in home feed

Daniel Supernault 1 year ago
parent
commit
ddc217147c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app/Http/Controllers/Api/ApiV1Controller.php

+ 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;