Merge pull request #4576 from pixelfed/staging

Update RemoteStatusPipeline, fix reply check
This commit is contained in:
daniel 2023-08-06 21:52:35 -06:00 committed by GitHub
commit 211a9057fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,11 +93,13 @@ class RemoteStatusDelete implements ShouldQueue
{ {
if($status->in_reply_to_id) { if($status->in_reply_to_id) {
$parent = Status::findOrFail($status->in_reply_to_id); $parent = Status::find($status->in_reply_to_id);
if($parent) {
--$parent->reply_count; --$parent->reply_count;
$parent->save(); $parent->save();
StatusService::del($parent->id); StatusService::del($parent->id);
} }
}
AccountInterstitial::where('item_type', 'App\Status') AccountInterstitial::where('item_type', 'App\Status')
->where('item_id', $status->id) ->where('item_id', $status->id)