mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update delete pipelines, properly invoke StatusHashtag delete events
This commit is contained in:
parent
d24c60576f
commit
ce54d29c69
3 changed files with 12 additions and 3 deletions
|
@ -76,7 +76,10 @@ class DeleteRemoteStatusPipeline implements ShouldQueue
|
|||
});
|
||||
Mention::whereStatusId($status->id)->forceDelete();
|
||||
Report::whereObjectType('App\Status')->whereObjectId($status->id)->delete();
|
||||
StatusHashtag::whereStatusId($status->id)->delete();
|
||||
$statusHashtags = StatusHashtag::whereStatusId($status->id)->get();
|
||||
foreach($statusHashtags as $stag) {
|
||||
$stag->delete();
|
||||
}
|
||||
StatusView::whereStatusId($status->id)->delete();
|
||||
Status::whereReblogOfId($status->id)->forceDelete();
|
||||
$status->forceDelete();
|
||||
|
|
|
@ -153,7 +153,10 @@ class RemoteStatusDelete implements ShouldQueue, ShouldBeUniqueUntilProcessing
|
|||
->whereObjectId($status->id)
|
||||
->delete();
|
||||
StatusArchived::whereStatusId($status->id)->delete();
|
||||
StatusHashtag::whereStatusId($status->id)->delete();
|
||||
$statusHashtags = StatusHashtag::whereStatusId($status->id)->get();
|
||||
foreach($statusHashtags as $stag) {
|
||||
$stag->delete();
|
||||
}
|
||||
StatusView::whereStatusId($status->id)->delete();
|
||||
Status::whereInReplyToId($status->id)->update(['in_reply_to_id' => null]);
|
||||
|
||||
|
|
|
@ -130,7 +130,10 @@ class StatusDelete implements ShouldQueue
|
|||
->delete();
|
||||
|
||||
StatusArchived::whereStatusId($status->id)->delete();
|
||||
StatusHashtag::whereStatusId($status->id)->delete();
|
||||
$statusHashtags = StatusHashtag::whereStatusId($status->id)->get();
|
||||
foreach($statusHashtags as $stag) {
|
||||
$stag->delete();
|
||||
}
|
||||
StatusView::whereStatusId($status->id)->delete();
|
||||
Status::whereInReplyToId($status->id)->update(['in_reply_to_id' => null]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue