pull/6194/head
Emily Love Watson 1 month ago
parent a07f3595d8
commit 451d59cb7c
No known key found for this signature in database
GPG Key ID: 69981387DE7BC2EE

@ -115,7 +115,7 @@ class MoveMigrateFollowersPipeline implements ShouldQueue
->whereNotNull('profiles.user_id')
->whereNull('profiles.deleted_at')
->select('profiles.id', 'profiles.user_id', 'profiles.username', 'profiles.private_key', 'profiles.status')
->chunkById(100, function ($followers) use ($targetInbox, $targetPid, $target) {
->chunkById(100, function ($followers) use ($targetInbox, $targetPid, $targetAccount) {
foreach ($followers as $follower) {
if (! $follower->private_key || ! $follower->username || ! $follower->user_id || $follower->status === 'delete') {
continue;
@ -131,6 +131,6 @@ class MoveMigrateFollowersPipeline implements ShouldQueue
]);
}
}
}, 'profiles.id');
}, 'profiles.id', 'id');
}
}

@ -106,6 +106,6 @@ class UnfollowLegacyAccountMovePipeline implements ShouldQueue
MoveSendUndoFollowPipeline::dispatch($follower, $targetInbox, $targetPid, $actor)->onQueue('move');
}
}, 'id');
}, 'profiles.id', 'id');
}
}

@ -87,10 +87,8 @@ class ProfileMigrationMoveFollowersPipeline implements ShouldBeUniqueUntilProces
$followerProfile = Profile::find($follower->profile_id);
(new FollowerController)->sendFollow($followerProfile, $ne);
}
Follower::updateOrCreate([
'profile_id' => $follower->profile_id,
'following_id' => $this->newPid,
]);
$follower->following_id = $this->newPid;
$follower->save();
} catch (Exception $e) {
Log::error($e);
}

Loading…
Cancel
Save