소스 검색

Update timeline logic to filter non public posts

Daniel Supernault 7 년 전
부모
커밋
84ba7f4a9c
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/Http/Controllers/SiteController.php
  2. 1 0
      app/Http/Controllers/TimelineController.php

+ 1 - 0
app/Http/Controllers/SiteController.php

@@ -42,6 +42,7 @@ class SiteController extends Controller
         $timeline = Status::whereIn('profile_id', $following)
                   ->whereNotIn('profile_id', $filtered)
                   ->whereHas('media')
+                  ->whereVisibility('public')
                   ->orderBy('id', 'desc')
                   ->withCount(['comments', 'likes', 'shares'])
                   ->simplePaginate(20);

+ 1 - 0
app/Http/Controllers/TimelineController.php

@@ -52,6 +52,7 @@ class TimelineController extends Controller
                   ->whereNotIn('profile_id', $filtered)
                   ->whereNull('in_reply_to_id')
                   ->whereNull('reblog_of_id')
+                  ->whereVisibility('public')
                   ->withCount(['comments', 'likes'])
                   ->orderBy('id', 'desc')
                   ->simplePaginate(20);