mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update ProfileController, show follow request on private profiles
This commit is contained in:
parent
796f8ca78c
commit
3603913f2a
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
||||||
use Auth;
|
use Auth;
|
||||||
use Cache;
|
use Cache;
|
||||||
use App\Follower;
|
use App\Follower;
|
||||||
|
use App\FollowRequest;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\User;
|
use App\User;
|
||||||
use App\UserFilter;
|
use App\UserFilter;
|
||||||
|
@ -67,8 +68,12 @@ class ProfileController extends Controller
|
||||||
$is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
|
$is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
|
||||||
|
|
||||||
if ($isPrivate == true || $isBlocked == true) {
|
if ($isPrivate == true || $isBlocked == true) {
|
||||||
return view('profile.private', compact('user', 'is_following'));
|
$requested = Auth::check() ? FollowRequest::whereFollowerId(Auth::user()->profile_id)
|
||||||
|
->whereFollowingId($user->id)
|
||||||
|
->exists() : false;
|
||||||
|
return view('profile.private', compact('user', 'is_following', 'requested'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_admin = is_null($user->domain) ? $user->user->is_admin : false;
|
$is_admin = is_null($user->domain) ? $user->user->is_admin : false;
|
||||||
$profile = $user;
|
$profile = $user;
|
||||||
$settings = [
|
$settings = [
|
||||||
|
|
Loading…
Reference in a new issue