From 99284222c1d7fb4adca9077e3057faf3b36f7180 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 22 Dec 2022 22:08:42 +0000 Subject: [PATCH] Remove the activity --- src/Protocol/ActivityPub/Processor.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index a18d6be774..d689ba72a5 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -1715,11 +1715,13 @@ class Processor { if (empty($activity['object_id']) || empty($activity['actor'])) { Logger::info('Empty object id or actor.'); + Queue::remove($activity); return; } if ($activity['object_id'] != $activity['actor']) { Logger::info('Object id does not match actor.'); + Queue::remove($activity); return; } @@ -1743,17 +1745,20 @@ class Processor public static function movePerson(array $activity) { if (empty($activity['target_id']) || empty($activity['object_id'])) { + Queue::remove($activity); return; } if ($activity['object_id'] != $activity['actor']) { Logger::notice('Object is not the actor', ['activity' => $activity]); + Queue::remove($activity); return; } $from = Contact::getByURL($activity['object_id'], false, ['uri-id']); if (empty($from['uri-id'])) { Logger::info('Object not found', ['activity' => $activity]); + Queue::remove($activity); return; } @@ -1763,6 +1768,7 @@ class Processor Logger::debug('Follower added', ['from' => $from_contact, 'result' => $result]); } DBA::close($contacts); + Queue::remove($activity); } /** -- 2.39.5