]> git.mxchange.org Git - friendica.git/commitdiff
AP: Interpret "update" as "create" when item isn't found
authorMichael <heluecht@pirati.ca>
Thu, 23 Apr 2020 19:56:48 +0000 (19:56 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 23 Apr 2020 19:56:48 +0000 (19:56 +0000)
src/Protocol/ActivityPub/Processor.php

index 4b49bd55cfbf34f95fc326fe54e4e45b7dcaf3f7..7860223432d7e580b55e9d1027132e21f4ccd5dc 100644 (file)
@@ -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;
                }