From b3078f274f5fdc42f140e34824fd8722dc0fb4e6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 5 Dec 2020 00:20:45 -0700 Subject: [PATCH] Update DeleteAccountPipeline, add AccountInterstitial and DirectMessage purging --- app/Jobs/DeletePipeline/DeleteAccountPipeline.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Jobs/DeletePipeline/DeleteAccountPipeline.php b/app/Jobs/DeletePipeline/DeleteAccountPipeline.php index c9777df5e..a225b48d9 100644 --- a/app/Jobs/DeletePipeline/DeleteAccountPipeline.php +++ b/app/Jobs/DeletePipeline/DeleteAccountPipeline.php @@ -10,6 +10,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use DB; use Illuminate\Support\Str; use App\{ + AccountInterstitial, AccountLog, Activity, Avatar, @@ -68,6 +69,10 @@ class DeleteAccountPipeline implements ShouldQueue }); }); + DB::transaction(function() use ($user) { + AccountInterstitial::whereUserId($user->id)->delete(); + }); + DB::transaction(function() use ($user) { if($user->profile) { $avatar = $user->profile->avatar; @@ -79,6 +84,7 @@ class DeleteAccountPipeline implements ShouldQueue Bookmark::whereProfileId($user->profile_id)->forceDelete(); EmailVerification::whereUserId($user->id)->forceDelete(); StatusHashtag::whereProfileId($id)->delete(); + DirectMessage::whereFromId($user->profile_id)->delete(); FollowRequest::whereFollowingId($id) ->orWhere('follower_id', $id) ->forceDelete();