mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update FollowerController
This commit is contained in:
parent
9b501e9c59
commit
38d6d58dc8
1 changed files with 4 additions and 4 deletions
|
@ -34,10 +34,10 @@ class FollowerController extends Controller
|
|||
$isFollowing = Follower::whereProfileId($user->id)->whereFollowingId($target->id)->count();
|
||||
|
||||
if($private == true && $isFollowing == 0) {
|
||||
$follow = new FollowRequest;
|
||||
$follow->follower_id = $user->id;
|
||||
$follow->following_id = $target->id;
|
||||
$follow->save();
|
||||
$follow = FollowRequest::firstOrCreate([
|
||||
'follower_id' => $user->id,
|
||||
'following_id' => $target->id
|
||||
]);
|
||||
} elseif ($isFollowing == 0) {
|
||||
$follower = new Follower();
|
||||
$follower->profile_id = $user->id;
|
||||
|
|
Loading…
Reference in a new issue