From 9818656425c46c0c42d624a8dead09d68a127aa2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 8 Dec 2023 04:27:09 -0700 Subject: [PATCH] Update DirectMessageController, dispatch local deletes to pipeline --- app/Http/Controllers/DirectMessageController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/DirectMessageController.php b/app/Http/Controllers/DirectMessageController.php index 959b944ce..b706572b3 100644 --- a/app/Http/Controllers/DirectMessageController.php +++ b/app/Http/Controllers/DirectMessageController.php @@ -17,6 +17,7 @@ use App\{ use App\Services\MediaPathService; use App\Services\MediaBlocklistService; use App\Jobs\StatusPipeline\NewStatusPipeline; +use App\Jobs\StatusPipeline\StatusDelete; use Illuminate\Support\Str; use App\Util\ActivityPub\Helpers; use App\Services\AccountService; @@ -502,6 +503,8 @@ class DirectMessageController extends Controller if($recipient['local'] == false) { $dmc = $dm; $this->remoteDelete($dmc); + } else { + StatusDelete::dispatch($status)->onQueue('high'); } if(Conversation::whereStatusId($sid)->count()) { @@ -543,9 +546,6 @@ class DirectMessageController extends Controller StatusService::del($status->id, true); - $status->delete(); - $dm->delete(); - return [200]; }