]> git.mxchange.org Git - friendica.git/commitdiff
Remove explicit block filtering for results that go through selectViewForUser
authorHank Grabowski <hankgrabowski@gmail.com>
Thu, 16 Feb 2023 21:06:56 +0000 (16:06 -0500)
committerHank Grabowski <hankgrabowski@gmail.com>
Thu, 16 Feb 2023 21:06:56 +0000 (16:06 -0500)
src/Module/Api/Mastodon/Timelines/Home.php
src/Module/Api/Mastodon/Timelines/ListTimeline.php
src/Module/Api/Mastodon/Timelines/PublicTimeline.php

index c121bad666b00095ca9f0289082d2e9e65383694..5efaf4930ebbe380c26c38e857917b152f0f4040 100644 (file)
@@ -90,13 +90,6 @@ class Home extends BaseApi
                        $condition = DBA::mergeConditions($condition, ['gravity' => Item::GRAVITY_PARENT]);
                }
 
-               if (!empty($uid)) {
-                       $condition = DBA::mergeConditions(
-                               $condition,
-                               ["NOT `parent-author-id` IN (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND (`blocked` OR `ignored`) AND `cid` = `parent-author-id`)", $uid]
-                       );
-               }
-
                $items = Post::selectForUser($uid, ['uri-id'], $condition, $params);
 
                $display_quotes = self::appSupportsQuotes();
index 378e3eeaaf423194f3fffaa6951a1357546e92c8..a8de13056ec45fb0b1367c31813453f8c63b6bf3 100644 (file)
@@ -95,13 +95,6 @@ class ListTimeline extends BaseApi
                        $condition = DBA::mergeConditions($condition, ["NOT `uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE `origin` AND `post-user`.`uri-id` = `post-user-view`.`uri-id`)"]);
                }
 
-               if (!empty($uid)) {
-                       $condition = DBA::mergeConditions(
-                               $condition,
-                               ["NOT `parent-author-id` IN (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND (`blocked` OR `ignored`) AND `cid` = `parent-author-id`)", $uid]
-                       );
-               }
-
                $items = Post::selectForUser($uid, ['uri-id'], $condition, $params);
 
                $display_quotes = self::appSupportsQuotes();
index 083d9867ed524cb08d47f9de0261896d673271d1..968e34dbb9f65393d0ba3e33a66f41681dd4ac5d 100644 (file)
@@ -90,11 +90,6 @@ class PublicTimeline extends BaseApi
                        $condition = DBA::mergeConditions($condition, ['gravity' => Item::GRAVITY_PARENT]);
                }
 
-               if (!empty($uid)) {
-                       $condition = DBA::mergeConditions($condition,
-                               ["NOT `parent-author-id` IN (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND (`blocked` OR `ignored`) AND `cid` = `parent-author-id`)", $uid]);
-               }
-
                $items = Post::selectPostsForUser($uid, ['uri-id'], $condition, $params);
 
                $display_quotes = self::appSupportsQuotes();