]> git.mxchange.org Git - friendica.git/commitdiff
Don't use the GUID value directly
authorMichael <heluecht@pirati.ca>
Mon, 14 Mar 2022 21:09:14 +0000 (21:09 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 14 Mar 2022 21:09:14 +0000 (21:09 +0000)
src/Protocol/Feed.php

index d74d26f489fabaff226348524460cb5a0015e488..cde81394d3c0f0acce4354f3c46accd3b26c52ea 100644 (file)
@@ -310,7 +310,9 @@ class Feed
                        $guid = XML::getFirstNodeValue($xpath, 'guid/text()', $entry);
                        if (!empty($guid)) {
                                $item["uri"] = $guid;
-                               $item["guid"] = $guid;
+
+                               // Don't use the GUID value directly but instead use it as a basis for the GUID
+                               $item["guid"] = Item::guidFromUri($guid, parse_url($guid, PHP_URL_HOST) ?? parse_url($item["plink"], PHP_URL_HOST));
                        }
 
                        if (empty($item["uri"])) {