]> git.mxchange.org Git - friendica.git/commitdiff
Issue 3011 (and others): OStatus: Don't fetch liked contents
authorMichael <heluecht@pirati.ca>
Sun, 15 Jan 2017 09:07:57 +0000 (09:07 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 15 Jan 2017 09:07:57 +0000 (09:07 +0000)
include/ostatus.php

index ba64f493dbad9d6addacc1884237627440a17a7d..2c4b677a53af99bf5316cc9ca8caa8a512ac5802 100644 (file)
@@ -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) {