浏览代码

Update ApiV1Controller, fix mutes in home feed

Daniel Supernault 1 年之前
父节点
当前提交
ddc217147c
共有 1 个文件被更改,包括 6 次插入0 次删除
  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;