1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-22 07:42:41 +00:00

Update MovePipeline to handle mute and block migrations

This commit is contained in:
Daniel Supernault 2024-09-11 04:27:30 -06:00
parent f1497655ba
commit 002dfefbdd
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -5,6 +5,7 @@ namespace App\Jobs\MovePipeline;
use App\Follower;
use App\Profile;
use App\Services\AccountService;
use App\UserFilter;
use App\Util\ActivityPub\Helpers;
use DateTime;
use Exception;
@ -84,6 +85,10 @@ class CleanupLegacyAccountMovePipeline implements ShouldQueue
throw new Exception('Invalid move accounts');
}
UserFilter::where('filterable_type', 'App\Profile')
->where('filterable_id', $actorAccount['id'])
->update(['filterable_id' => $targetAccount['id']]);
Follower::whereFollowingId($actorAccount['id'])->delete();
$oldProfile = Profile::find($actorAccount['id']);