Merge pull request #8539 from annando/ap-update-create

AP: Interpret "update" as "create" when item isn't found
This commit is contained in:
Hypolite Petovan 2020-04-24 01:08:14 -04:00 committed by GitHub
commit 911dc9d794
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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;
}