From 87beee2a4416c0e5ee9cf5e13eef709310f439e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 23 Apr 2020 19:56:48 +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 4b49bd55c..786022343 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; }