1
0
Fork 0

Add the uri-id for the quoted post if it exists

This commit is contained in:
Michael 2023-04-08 06:35:12 +00:00
parent ab89e89b40
commit c07c34a6ec

View file

@ -840,6 +840,9 @@ class Processor
if ($id) { if ($id) {
$shared_item = Post::selectFirst(['uri-id'], ['id' => $id]); $shared_item = Post::selectFirst(['uri-id'], ['id' => $id]);
$item['quote-uri-id'] = $shared_item['uri-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 { } else {
Logger::info('Quote was not fetched', ['guid' => $item['guid'], 'uri-id' => $item['uri-id'], 'quote' => $activity['quote-url']]); Logger::info('Quote was not fetched', ['guid' => $item['guid'], 'uri-id' => $item['uri-id'], 'quote' => $activity['quote-url']]);
} }