X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Ffeed.php;h=eb91f7efd465b76dee003bdbe1fbb00f9b4587db;hb=810843763dcde2a004f992dc23c928a45ab8184b;hp=18d96e6abb15c1bef9d3d2716b54b16728572192;hpb=7f8284eb1b2e77b0fd0b1ca77d9eba4c2ebda067;p=friendica.git diff --git a/include/feed.php b/include/feed.php index 18d96e6abb..eb91f7efd4 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,14 +203,14 @@ 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` IN ('%s', '%s')", + intval($importer["uid"]), dbesc($item["uri"]), dbesc(NETWORK_FEED), dbesc(NETWORK_DFRN)); if ($r) { logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already existed under id ".$r[0]["id"], LOGGER_DEBUG); continue; } - // To-Do? + /// @TODO ? // Ausland //