From 85edc9ddd58e1b8e8dc88e2549d239530eb0100a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 14 Nov 2025 04:24:05 -0700 Subject: [PATCH] Update ActivityPub inbox, properly handle eloquent deletions to trigger observer events --- app/Util/ActivityPub/Inbox.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 8488df790..1cd586c95 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -775,6 +775,13 @@ class Inbox if (! $profile || $profile->private_key != null) { return; } + + Notification::whereActorId($profile->id) + ->chunkById(100, function ($notifications) { + foreach ($notifications as $notification) { + $notification->forceDelete(); + } + }); DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('inbox'); return;