From: Michael Date: Fri, 15 Mar 2019 20:31:07 +0000 (+0000) Subject: Issue 6167: Don't publish non visible content X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4ff837488f6bdf107759435ab7a4dcce71f1ab6a;p=friendica.git Issue 6167: Don't publish non visible content --- diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 94012e4d63..d85f67a7cc 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -152,7 +152,7 @@ class Transmitter $condition = ['uid' => 0, 'contact-id' => $public_contact, 'author-id' => $public_contact, 'private' => false, 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT], - 'deleted' => false, 'visible' => true]; + 'deleted' => false, 'visible' => true, 'moderated' => false]; $count = DBA::count('item', $condition); $data = ['@context' => ActivityPub::CONTEXT]; diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index efd3c4aa60..8433801812 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -254,7 +254,7 @@ class DFRN FROM `item` USE INDEX (`uid_wall_changed`) $sql_post_table STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`wall` AND `item`.`changed` > '%s' - $sql_extra + AND `item`.`visible` $sql_extra ORDER BY `item`.`parent` ".$sort.", `item`.`created` ASC LIMIT 0, 300", intval($owner_id), DBA::escape($check_date), diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 34394ae481..917a83ccbb 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -60,7 +60,7 @@ class Delivery extends BaseObject } $parent_id = intval($item['parent']); - $condition = ['id' => [$target_id, $parent_id], 'moderated' => false]; + $condition = ['id' => [$target_id, $parent_id], 'visible' => true, 'moderated' => false]; $params = ['order' => ['id']]; $itemdata = Model\Item::select([], $condition, $params); diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 58460329b4..baae33f7e0 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -99,11 +99,6 @@ class Notifier return; } - // Issue 6167: We don't distribute image uploads - if ($target_item['post-type'] == Item::PT_IMAGE) { - return; - } - if (!empty($target_item['contact-uid'])) { $uid = $target_item['contact-uid']; } elseif (!empty($target_item['uid'])) {