X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fostatus.php;h=2c4b677a53af99bf5316cc9ca8caa8a512ac5802;hb=f94a10bf00de699a5f3d22ea74665053a5661175;hp=f00f682978ed5d25ebb272fa334bd310956dfdb3;hpb=1490f2d3b724348909ff879db4773871dec1cd7f;p=friendica.git diff --git a/include/ostatus.php b/include/ostatus.php index f00f682978..2c4b677a53 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -523,7 +523,9 @@ class ostatus { $r = q("SELECT `id` FROM `item` WHERE `uid` = %d AND `uri` = '%s'", intval($importer["uid"]), dbesc($item["parent-uri"])); - if (!$r AND ($related != "")) { + // Only fetch missing stuff if it is a comment or reshare. + if (in_array($item["verb"], array(ACTIVITY_POST, ACTIVITY_SHARE)) AND + !dbm::is_result($r) AND ($related != "")) { $reply_path = str_replace("/notice/", "/api/statuses/show/", $related).".atom"; if ($reply_path != $related) { @@ -2072,7 +2074,7 @@ class ostatus { * * @return string XML feed */ - public static function feed(&$a, $owner_nick, $last_update) { + public static function feed(App $a, $owner_nick, $last_update) { $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`