From f746299711b357f226424c06575af9064ab0864c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 20 Aug 2018 20:46:13 -0600 Subject: [PATCH] Update ProfileController and partial, fix status count --- app/Http/Controllers/ProfileController.php | 8 +++++++- resources/views/profile/partial/user-info.blade.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 985df88ed..4e647caba 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -18,7 +18,12 @@ class ProfileController extends Controller public function show(Request $request, $username) { $user = Profile::whereUsername($username)->firstOrFail(); - $settings = User::whereUsername($username)->firstOrFail()->settings; + if($user->remote_url) { + $settings = new \StdClass; + $settings->crawlable = false; + } else { + $settings = User::whereUsername($username)->firstOrFail()->settings; + } if($request->wantsJson() && config('pixelfed.activitypub_enabled')) { return $this->showActivityPub($request, $user); @@ -37,6 +42,7 @@ class ProfileController extends Controller $timeline = $user->statuses() ->whereHas('media') ->whereNull('in_reply_to_id') + ->whereNull('reblog_of_id') ->orderBy('created_at','desc') ->withCount(['comments', 'likes']) ->simplePaginate(21); diff --git a/resources/views/profile/partial/user-info.blade.php b/resources/views/profile/partial/user-info.blade.php index 8e801d522..75326885f 100644 --- a/resources/views/profile/partial/user-info.blade.php +++ b/resources/views/profile/partial/user-info.blade.php @@ -53,7 +53,7 @@