]> git.mxchange.org Git - friendica.git/blobdiff - include/threads.php
Merge pull request #3770 from tobiasd/20171008-dotca
[friendica.git] / include / threads.php
index d04ba38ef18069f3d71d841acf79f291e5ba73d4..169a63c7ca144284677a85abf786a6fcc1540fb1 100644 (file)
@@ -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