]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Notifier.php
Merge pull request #8494 from annando/ap-fix-comments
[friendica.git] / src / Worker / Notifier.php
index b3741e546d2ee27a3c2810a076681649a9ea5d11..35a228fce1b1622d2fc548857fa1c6663a5c082c 100644 (file)
@@ -151,6 +151,8 @@ class Notifier
                // If this is a public conversation, notify the feed hub
                $public_message = true;
 
+               $unlisted = false;
+
                // Do a PuSH
                $push_notify = false;
 
@@ -183,6 +185,8 @@ class Notifier
                                Logger::info('Threaded comment', ['diaspora_delivery' => (int)$diaspora_delivery]);
                        }
 
+                       $unlisted = $target_item['private'] == Item::UNLISTED;
+
                        // This is IMPORTANT!!!!
 
                        // We will only send a "notify owner to relay" or followup message if the referenced post
@@ -245,8 +249,7 @@ class Notifier
 
                                Logger::info('Followup', ['target' => $target_id, 'guid' => $target_item['guid'], 'to' => $parent['contact-id']]);
 
-                               //if (!$target_item['private'] && $target_item['wall'] &&
-                               if (!$target_item['private'] &&
+                               if (($target_item['private'] != Item::PRIVATE) &&
                                        (strlen($target_item['allow_cid'].$target_item['allow_gid'].
                                                $target_item['deny_cid'].$target_item['deny_gid']) == 0))
                                        $push_notify = true;
@@ -410,7 +413,7 @@ class Notifier
                if ($public_message && !in_array($cmd, [Delivery::MAIL, Delivery::SUGGESTION]) && !$followup) {
                        $relay_list = [];
 
-                       if ($diaspora_delivery) {
+                       if ($diaspora_delivery && !$unlisted) {
                                $batch_delivery = true;
 
                                $relay_list_stmt = DBA::p(