Support unlisted public posts

This commit is contained in:
Michael 2020-03-02 07:57:23 +00:00
parent 357c0072bd
commit ca1b92bb34
29 changed files with 146 additions and 100 deletions

View 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(