]> git.mxchange.org Git - friendica.git/blobdiff - include/feed.php
Continued with code convention:
[friendica.git] / include / feed.php
index 5adb2294db0248e92b4b9ac3e81a9288c3866f11..579ff7caae3652cce6c9fcb714720886bd32334f 100644 (file)
@@ -325,6 +325,14 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
                        logger("Stored feed: ".print_r($item, true), LOGGER_DEBUG);
 
                        $notify = item_is_remote_self($contact, $item);
+
+                       // Distributed items should have a well formatted URI.
+                       // Additionally we have to avoid conflicts with identical URI between imported feeds and these items.
+                       if ($notify) {
+                               unset($item['uri']);
+                               unset($item['parent-uri']);
+                       }
+
                        $id = item_store($item, false, $notify);
 
                        logger("Feed for contact ".$contact["url"]." stored under id ".$id);