From: Michael Date: Sat, 8 Apr 2023 06:35:12 +0000 (+0000) Subject: Add the uri-id for the quoted post if it exists X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c07c34a6ec29de9ff9ca8eccc3e319615649a326;p=friendica.git Add the uri-id for the quoted post if it exists --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 1963d7e057..86394bd91c 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -840,6 +840,9 @@ class Processor if ($id) { $shared_item = Post::selectFirst(['uri-id'], ['id' => $id]); $item['quote-uri-id'] = $shared_item['uri-id']; + } elseif ($uri_id = ItemURI::getIdByURI($activity['quote-url'], false)) { + Logger::info('Quote was not fetched but the uri-id existed', ['guid' => $item['guid'], 'uri-id' => $item['uri-id'], 'quote' => $activity['quote-url'], 'uri-id' => $uri_id]); + $item['quote-uri-id'] = $uri_id; } else { Logger::info('Quote was not fetched', ['guid' => $item['guid'], 'uri-id' => $item['uri-id'], 'quote' => $activity['quote-url']]); }