]> git.mxchange.org Git - friendica.git/commitdiff
Add the uri-id for the quoted post if it exists
authorMichael <heluecht@pirati.ca>
Sat, 8 Apr 2023 06:35:12 +0000 (06:35 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 8 Apr 2023 06:35:12 +0000 (06:35 +0000)
src/Protocol/ActivityPub/Processor.php

index 1963d7e057495d60c169bd82ffa424a14f184767..86394bd91c8166d047cc195cdfdc38eab137d65c 100644 (file)
@@ -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']]);
                        }