mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 09:17:03 +00:00
Update DeleteAccountPipeline, add AccountInterstitial and DirectMessage purging
This commit is contained in:
parent
473e049528
commit
b3078f274f
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use DB;
|
use DB;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use App\{
|
use App\{
|
||||||
|
AccountInterstitial,
|
||||||
AccountLog,
|
AccountLog,
|
||||||
Activity,
|
Activity,
|
||||||
Avatar,
|
Avatar,
|
||||||
|
@ -68,6 +69,10 @@ class DeleteAccountPipeline implements ShouldQueue
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
DB::transaction(function() use ($user) {
|
||||||
|
AccountInterstitial::whereUserId($user->id)->delete();
|
||||||
|
});
|
||||||
|
|
||||||
DB::transaction(function() use ($user) {
|
DB::transaction(function() use ($user) {
|
||||||
if($user->profile) {
|
if($user->profile) {
|
||||||
$avatar = $user->profile->avatar;
|
$avatar = $user->profile->avatar;
|
||||||
|
@ -79,6 +84,7 @@ class DeleteAccountPipeline implements ShouldQueue
|
||||||
Bookmark::whereProfileId($user->profile_id)->forceDelete();
|
Bookmark::whereProfileId($user->profile_id)->forceDelete();
|
||||||
EmailVerification::whereUserId($user->id)->forceDelete();
|
EmailVerification::whereUserId($user->id)->forceDelete();
|
||||||
StatusHashtag::whereProfileId($id)->delete();
|
StatusHashtag::whereProfileId($id)->delete();
|
||||||
|
DirectMessage::whereFromId($user->profile_id)->delete();
|
||||||
FollowRequest::whereFollowingId($id)
|
FollowRequest::whereFollowingId($id)
|
||||||
->orWhere('follower_id', $id)
|
->orWhere('follower_id', $id)
|
||||||
->forceDelete();
|
->forceDelete();
|
||||||
|
|
Loading…
Reference in a new issue