Browse Source

Update PublicApiController

Daniel Supernault 6 years ago
parent
commit
3c63bc49cf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Http/Controllers/PublicApiController.php

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

@@ -300,7 +300,7 @@ class PublicApiController extends Controller
                       ->whereNotIn('profile_id', $filtered)
                       ->whereNotIn('profile_id', $filtered)
                       ->whereNull('in_reply_to_id')
                       ->whereNull('in_reply_to_id')
                       ->whereNull('reblog_of_id')
                       ->whereNull('reblog_of_id')
-                      ->whereVisibility('public')
+                      ->whereIn('visibility',['public', 'unlisted', 'private'])
                       ->withCount(['comments', 'likes'])
                       ->withCount(['comments', 'likes'])
                       ->orderBy('created_at', 'desc')
                       ->orderBy('created_at', 'desc')
                       ->limit($limit)
                       ->limit($limit)
@@ -311,7 +311,7 @@ class PublicApiController extends Controller
                       ->whereNotIn('profile_id', $filtered)
                       ->whereNotIn('profile_id', $filtered)
                       ->whereNull('in_reply_to_id')
                       ->whereNull('in_reply_to_id')
                       ->whereNull('reblog_of_id')
                       ->whereNull('reblog_of_id')
-                      ->whereVisibility('public')
+                      ->whereIn('visibility',['public', 'unlisted', 'private'])
                       ->withCount(['comments', 'likes'])
                       ->withCount(['comments', 'likes'])
                       ->orderBy('created_at', 'desc')
                       ->orderBy('created_at', 'desc')
                       ->simplePaginate($limit);
                       ->simplePaginate($limit);