diff --git a/app/Http/Controllers/InternalApiController.php b/app/Http/Controllers/InternalApiController.php
index 0c5bd22fe..d88edcb11 100644
--- a/app/Http/Controllers/InternalApiController.php
+++ b/app/Http/Controllers/InternalApiController.php
@@ -63,17 +63,6 @@ class InternalApiController extends Controller
});
$following = array_merge($following, $filters);
- $people = Profile::select('id', 'name', 'username')
- ->with('avatar')
- ->whereNull('status')
- ->orderByRaw('rand()')
- ->whereHas('statuses')
- ->whereNull('domain')
- ->whereNotIn('id', $following)
- ->whereIsPrivate(false)
- ->take(3)
- ->get();
-
$posts = Status::select('id', 'caption', 'profile_id')
->whereHas('media')
->whereIsNsfw(false)
@@ -85,15 +74,6 @@ class InternalApiController extends Controller
->get();
$res = [
- 'people' => $people->map(function($profile) {
- return [
- 'id' => $profile->id,
- 'avatar' => $profile->avatarUrl(),
- 'name' => $profile->name,
- 'username' => $profile->username,
- 'url' => $profile->url(),
- ];
- }),
'posts' => $posts->map(function($post) {
return [
'url' => $post->url(),
@@ -104,45 +84,6 @@ class InternalApiController extends Controller
return response()->json($res, 200, [], JSON_PRETTY_PRINT);
}
- public function discoverPeople(Request $request)
- {
- $profile = Auth::user()->profile;
- $pid = $profile->id;
- $following = Cache::remember('feature:discover:following:'.$pid, now()->addMinutes(60), function() use ($pid) {
- return Follower::whereProfileId($pid)->pluck('following_id')->toArray();
- });
- $filters = Cache::remember("user:filter:list:$pid", now()->addMinutes(60), function() use($pid) {
- return UserFilter::whereUserId($pid)
- ->whereFilterableType('App\Profile')
- ->whereIn('filter_type', ['mute', 'block'])
- ->pluck('filterable_id')->toArray();
- });
- $following = array_merge($following, $filters);
-
- $people = Profile::select('id', 'name', 'username')
- ->with('avatar')
- ->orderByRaw('rand()')
- ->whereHas('statuses')
- ->whereNull('domain')
- ->whereNotIn('id', $following)
- ->whereIsPrivate(false)
- ->take(3)
- ->get();
-
- $res = [
- 'people' => $people->map(function($profile) {
- return [
- 'id' => $profile->id,
- 'avatar' => $profile->avatarUrl(),
- 'name' => $profile->name,
- 'username' => $profile->username,
- 'url' => $profile->url(),
- ];
- })
- ];
- return response()->json($res, 200, [], JSON_PRETTY_PRINT);
- }
-
public function discoverPosts(Request $request)
{
$profile = Auth::user()->profile;
diff --git a/resources/views/account/activity.blade.php b/resources/views/account/activity.blade.php
index f8fe5d2b8..1c8bf9970 100644
--- a/resources/views/account/activity.blade.php
+++ b/resources/views/account/activity.blade.php
@@ -88,10 +88,12 @@
{{$notification->created_at->diffForHumans(null, true, true, true)}}
- @if(false == true && $notification->item_id && $notification->item_type == 'App\Status')
+ @if($notification->item_id && $notification->item_type == 'App\Status')
+ @if($notification->status->parent())
+ @endif
@endif
@break