Update DirectMessageController, dispatch local deletes to pipeline

This commit is contained in:
Daniel Supernault 2023-12-08 04:27:09 -07:00
parent 93a6f1e224
commit 9818656425
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -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];
}