mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 17:44:27 +02:00
Merge pull request #8357 from annando/private
Support unlisted public posts
This commit is contained in:
commit
dd613cda45
30 changed files with 183 additions and 156 deletions
|
@ -176,7 +176,7 @@ class Delivery
|
|||
&& empty($parent['allow_gid'])
|
||||
&& empty($parent['deny_cid'])
|
||||
&& empty($parent['deny_gid'])
|
||||
&& !$parent["private"]) {
|
||||
&& ($parent["private"] != Model\Item::PRIVATE)) {
|
||||
$public_message = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -657,11 +657,11 @@ class OnePoll
|
|||
$datarray['owner-avatar'] = $contact['photo'];
|
||||
|
||||
if ($datarray['parent-uri'] === $datarray['uri']) {
|
||||
$datarray['private'] = 1;
|
||||
$datarray['private'] = Item::PRIVATE;
|
||||
}
|
||||
|
||||
if (!DI::pConfig()->get($importer_uid, 'system', 'allow_public_email_replies')) {
|
||||
$datarray['private'] = 1;
|
||||
$datarray['private'] = Item::PRIVATE;
|
||||
$datarray['allow_cid'] = '<' . $contact['id'] . '>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue