mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-03 18:30:47 +00:00
Update ApiV1Controller, fix followAccountById with firstOrCreate()
This commit is contained in:
parent
59702d406b
commit
1d52ad0b27
1 changed files with 4 additions and 4 deletions
|
@ -692,10 +692,10 @@ class ApiV1Controller extends Controller
|
||||||
(new FollowerController())->sendFollow($user->profile, $target);
|
(new FollowerController())->sendFollow($user->profile, $target);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$follower = new Follower();
|
$follower = Follower::firstOrCreate([
|
||||||
$follower->profile_id = $user->profile_id;
|
'profile_id' => $user->profile_id,
|
||||||
$follower->following_id = $target->id;
|
'following_id' => $target->id
|
||||||
$follower->save();
|
]);
|
||||||
|
|
||||||
if($remote == true && config('federation.activitypub.remoteFollow') == true) {
|
if($remote == true && config('federation.activitypub.remoteFollow') == true) {
|
||||||
(new FollowerController())->sendFollow($user->profile, $target);
|
(new FollowerController())->sendFollow($user->profile, $target);
|
||||||
|
|
Loading…
Reference in a new issue