Update StatusDelete pipeline

This commit is contained in:
Daniel Supernault 2022-12-30 21:11:51 -07:00
parent 52879826fa
commit e029d09c8a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -93,7 +93,7 @@ class StatusDelete implements ShouldQueue
Media::whereStatusId($status->id)
->get()
->each(function($media) {
MediaDeletePipeline::dispatch($media)->onQueue('mmo');
MediaDeletePipeline::dispatchNow($media);
});
if($status->in_reply_to_id) {
@ -142,13 +142,14 @@ class StatusDelete implements ShouldQueue
public function fanoutDelete($status)
{
$audience = $status->profile->getAudienceInbox();
$profile = $status->profile;
if(!$profile) {
return;
}
$audience = $status->profile->getAudienceInbox();
$fractal = new Fractal\Manager();
$fractal->setSerializer(new ArraySerializer());
$resource = new Fractal\Resource\Item($status, new DeleteNote());