X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fthreads.php;h=169a63c7ca144284677a85abf786a6fcc1540fb1;hb=fd5cf0f14728702b21007d133d4b990ecc350581;hp=d04ba38ef18069f3d71d841acf79f291e5ba73d4;hpb=2bcd5b3243004b0659be06a5370016d080b23e87;p=friendica.git diff --git a/include/threads.php b/include/threads.php index d04ba38ef1..169a63c7ca 100644 --- a/include/threads.php +++ b/include/threads.php @@ -32,7 +32,7 @@ function add_thread($itemid, $onlyshadow = false) { * @param integer $itemid Item ID that should be added */ function add_shadow_thread($itemid) { - $items = q("SELECT `uid`, `wall`, `private`, `moderated`, `visible`, `contact-id`, `deleted`, `network` + $items = q("SELECT `uid`, `wall`, `private`, `moderated`, `visible`, `contact-id`, `deleted`, `network`, `author-id`, `owner-id` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid)); if (!dbm::is_result($items)) { @@ -56,6 +56,11 @@ function add_shadow_thread($itemid) { return; } + // Is the public contact configured as hidden? + if (hiddenContact($item["owner-id"]) || hiddenContact($item["author-id"])) { + return; + } + // Only do these checks if the post isn't a wall post if (!$item["wall"]) { // Check, if hide-friends is activated - then don't do a shadow entry