From 002dfefbdd903d9663b771c64ff5460a08da7105 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 11 Sep 2024 04:27:30 -0600 Subject: [PATCH] Update MovePipeline to handle mute and block migrations --- app/Jobs/MovePipeline/CleanupLegacyAccountMovePipeline.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Jobs/MovePipeline/CleanupLegacyAccountMovePipeline.php b/app/Jobs/MovePipeline/CleanupLegacyAccountMovePipeline.php index bcf283afc..d26ad5624 100644 --- a/app/Jobs/MovePipeline/CleanupLegacyAccountMovePipeline.php +++ b/app/Jobs/MovePipeline/CleanupLegacyAccountMovePipeline.php @@ -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']);