mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-19 04:41:19 +00:00
Update FixDuplicateProfiles command
This commit is contained in:
parent
443acb8227
commit
e4e7b5062a
1 changed files with 14 additions and 2 deletions
|
@ -155,8 +155,20 @@ class FixDuplicateProfiles extends Command
|
||||||
|
|
||||||
protected function checkFollowers($id, $oid)
|
protected function checkFollowers($id, $oid)
|
||||||
{
|
{
|
||||||
Follower::whereProfileId($oid)->where('profile_id', '!=', $id)->update(['profile_id' => $id]);
|
$f = Follower::whereProfileId($oid)->pluck('following_id');
|
||||||
Follower::whereFollowingId($oid)->where('following_id', '!=', $id)->update(['following_id' => $id]);
|
foreach($f as $fo) {
|
||||||
|
Follower::updateOrCreate([
|
||||||
|
'profile_id' => $id,
|
||||||
|
'following_id' => $fo
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$f = Follower::whereFollowingId($oid)->pluck('profile_id');
|
||||||
|
foreach($f as $fo) {
|
||||||
|
Follower::updateOrCreate([
|
||||||
|
'profile_id' => $fo,
|
||||||
|
'following_id' => $id
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkHashtagFollow($id, $oid)
|
protected function checkHashtagFollow($id, $oid)
|
||||||
|
|
Loading…
Reference in a new issue