浏览代码

Update PublicApiController, filter out text replies on home timeline

Daniel Supernault 4 年之前
父节点
当前提交
86219b57fc
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/Http/Controllers/PublicApiController.php

+ 2 - 0
app/Http/Controllers/PublicApiController.php

@@ -430,6 +430,7 @@ class PublicApiController extends Controller
                       ->where('id', $dir, $id)
                       ->whereIn('profile_id', $following)
                       ->whereNotIn('profile_id', $filtered)
+                      ->whereNull('in_reply_to_id')
                       ->whereIn('visibility',['public', 'unlisted', 'private'])
                       ->orderBy('created_at', 'desc')
                       ->limit($limit)
@@ -459,6 +460,7 @@ class PublicApiController extends Controller
                       ->with('profile', 'hashtags', 'mentions')
                       ->whereIn('profile_id', $following)
                       ->whereNotIn('profile_id', $filtered)
+                      ->whereNull('in_reply_to_id')
                       ->whereIn('visibility',['public', 'unlisted', 'private'])
                       ->orderBy('created_at', 'desc')
                       ->simplePaginate($limit);