X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffeed.php;h=e66f279a9ba742e264b4f5e94cb437eba2fda98a;hb=a67710bc7cca030c74a71d4462c9ab55fa44d783;hp=18d96e6abb15c1bef9d3d2716b54b16728572192;hpb=2e8caf7f27197be5f12ea22f4a5e9aae2bb1ee89;p=friendica.git diff --git a/include/feed.php b/include/feed.php index 18d96e6abb..e66f279a9b 100644 --- a/include/feed.php +++ b/include/feed.php @@ -106,12 +106,22 @@ function feed_import($xml,$importer,&$contact, &$hub) { $header["wall"] = 0; $header["origin"] = 0; $header["gravity"] = GRAVITY_PARENT; + $header["private"] = 2; + $header["verb"] = ACTIVITY_POST; + $header["object-type"] = ACTIVITY_OBJ_NOTE; $header["contact-id"] = $contact["id"]; + if(!strlen($contact["notify"])) { + // one way feed - no remote comment ability + $header["last-child"] = 0; + } + if (!is_object($entries)) return; + $entrylist = array(); + foreach ($entries AS $entry) $entrylist[] = $entry; @@ -193,8 +203,8 @@ function feed_import($xml,$importer,&$contact, &$hub) { //$item["object"] = $xml; - $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s'", - intval($importer["uid"]), dbesc($item["uri"])); + $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s' AND `network` = '%s'", + intval($importer["uid"]), dbesc($item["uri"]), dbesc(NETWORK_FEED)); if ($r) { logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG); continue;