Jelajahi Sumber

Update MovePipeline to handle mute and block migrations

Daniel Supernault 10 bulan lalu
induk
melakukan
002dfefbdd

+ 5 - 0
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']);