Update ActivityPub inbox, properly handle eloquent deletions to trigger observer events

pull/6348/head
Daniel Supernault 9 hours ago
parent 1ed48c5df2
commit d7212d75d0
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -795,6 +795,14 @@ class Inbox
if ($status->profile_id != $profile->id) {
return;
}
$notifications = Notification::whereActorId($status->profile_id)
->whereItemId($status->id)
->whereItemType('App\Status')
->get();
foreach ($notifications as $notification) {
$notification->forceDelete();
}
if ($status->scope && in_array($status->scope, ['public', 'unlisted', 'private'])) {
if ($status->type && ! in_array($status->type, ['story:reaction', 'story:reply', 'reply'])) {
FeedRemoveRemotePipeline::dispatch($status->id, $status->profile_id)->onQueue('feed');

Loading…
Cancel
Save