From 778ff0689f5a62d2ff3a9ca86dc84620a19b3ba8 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 23 Apr 2020 19:57:20 +0000 Subject: [PATCH] AP: Interpret "update" as "create" when item isn't found --- src/Protocol/ActivityPub/Processor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 4b49bd55cf..7860223432 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -173,7 +173,8 @@ class Processor { $item = Item::selectFirst(['uri', 'uri-id', 'thr-parent', 'gravity'], ['uri' => $activity['id']]); if (!DBA::isResult($item)) { - Logger::warning('Unknown item', ['uri' => $activity['id']]); + Logger::warning('No existing item, item will be created', ['uri' => $activity['id']]); + self::createItem($activity); return; } -- 2.39.5