forked from mirror/pixelfed
Update FollowerController
This commit is contained in:
parent
9b501e9c59
commit
38d6d58dc8
|
@ -34,10 +34,10 @@ class FollowerController extends Controller
|
||||||
$isFollowing = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->count();
|
$isFollowing = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->count();
|
||||||
|
|
||||||
if($private == true && $isFollowing == 0) {
|
if($private == true && $isFollowing == 0) {
|
||||||
$follow = new FollowRequest;
|
$follow = FollowRequest::firstOrCreate([
|
||||||
$follow->follower_id = $user->id;
|
'follower_id' => $user->id,
|
||||||
$follow->following_id = $target->id;
|
'following_id' => $target->id
|
||||||
$follow->save();
|
]);
|
||||||
} elseif ($isFollowing == 0) {
|
} elseif ($isFollowing == 0) {
|
||||||
$follower = new Follower();
|
$follower = new Follower();
|
||||||
$follower->profile_id = $user->id;
|
$follower->profile_id = $user->id;
|
||||||
|
|
Loading…
Reference in New Issue