X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fostatus_conversation.php;h=ad90e3d3118c664861a753abb95a79465138717e;hb=17236b18011f6c2fa7df7d1433dd815d4438baf8;hp=480506a06d20bbbc4718badf7003118d249958b6;hpb=e7aa2b99a116c71c8ff625daa33442fbee3e9fce;p=friendica.git diff --git a/include/ostatus_conversation.php b/include/ostatus_conversation.php index 480506a06d..ad90e3d311 100644 --- a/include/ostatus_conversation.php +++ b/include/ostatus_conversation.php @@ -44,6 +44,11 @@ function check_conversations() { function complete_conversation($itemid, $conversation_url, $only_add_conversation = false) { global $a; + if ($a->last_ostatus_conversation_url == $conversation_url) + return; + + $a->last_ostatus_conversation_url = $conversation_url; + //logger('complete_conversation: completing conversation url '.$conversation_url.' for id '.$itemid); $messages = q("SELECT `uid`, `parent`, `created` FROM `item` WHERE `id` = %d LIMIT 1", intval($itemid)); @@ -81,7 +86,9 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio logger('complete_conversation: fetching conversation url '.$conv.' for '.$itemid); do { - $conv_as = file_get_contents($conv."?page=".$pageno); + $conv_as = fetch_url($conv."?page=".$pageno); + //$conv_as = fetch_url($conv."?page=".$pageno, false, 0, 10); + //$conv_as = file_get_contents($conv."?page=".$pageno); $conv_as = str_replace(',"statusnet:notice_info":', ',"statusnet_notice_info":', $conv_as); $conv_as = json_decode($conv_as); @@ -144,6 +151,7 @@ function complete_conversation($itemid, $conversation_url, $only_add_conversatio } $arr = array(); + $arr["network"] = NETWORK_OSTATUS; $arr["uri"] = $single_conv->id; $arr["plink"] = $single_conv->id; $arr["uid"] = $message["uid"];