From ba8c1017035b7edc8d6d9aea10dbb294e1c36f94 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 12 Jan 2019 13:46:14 -0700 Subject: [PATCH] Update FollowerController --- app/Http/Controllers/FollowerController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/FollowerController.php b/app/Http/Controllers/FollowerController.php index e312a293..d0ebb5fc 100644 --- a/app/Http/Controllers/FollowerController.php +++ b/app/Http/Controllers/FollowerController.php @@ -39,6 +39,7 @@ class FollowerController extends Controller $user = Auth::user()->profile; $target = Profile::where('id', '!=', $user->id)->whereNull('status')->findOrFail($item); $private = (bool) $target->is_private; + $remote = (bool) $target->domain; $blocked = UserFilter::whereUserId($target->id) ->whereFilterType('block') ->whereFilterableId($user->id) @@ -51,7 +52,7 @@ class FollowerController extends Controller $isFollowing = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->count(); - if($private == true && $isFollowing == 0) { + if($private == true && $isFollowing == 0 || $remote == true) { $follow = FollowRequest::firstOrCreate([ 'follower_id' => $user->id, 'following_id' => $target->id