浏览代码

Fix private pic display

Simounet 6 年之前
父节点
当前提交
7aea7506df
共有 1 个文件被更改,包括 1 次插入9 次删除
  1. 1 9
      app/Http/Controllers/PublicApiController.php

+ 1 - 9
app/Http/Controllers/PublicApiController.php

@@ -161,6 +161,7 @@ class PublicApiController extends Controller
         switch ($status->scope) {
             case 'public':
             case 'unlisted':
+            case 'private':
                 $user = Auth::check() ? Auth::user() : false;
                 if($user && $profile->is_private) {
                     $follows = Follower::whereProfileId($user->profile->id)
@@ -172,15 +173,6 @@ class PublicApiController extends Controller
                 }
                 break;
 
-            case 'private':
-                $follows = Follower::whereProfileId($user->profile->id)
-                    ->whereFollowingId($profile->id)
-                    ->exists();
-                if($follows == false && $profile->id !== $user->profile->id) {
-                    abort(404);
-                }
-                break;
-
             case 'direct':
                 abort(404);
                 break;