From: Hank Grabowski Date: Thu, 16 Feb 2023 21:06:56 +0000 (-0500) Subject: Remove explicit block filtering for results that go through selectViewForUser X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e3bfb39e917ff553b97507753be85f431e8b6d54;p=friendica.git Remove explicit block filtering for results that go through selectViewForUser --- diff --git a/src/Module/Api/Mastodon/Timelines/Home.php b/src/Module/Api/Mastodon/Timelines/Home.php index c121bad666..5efaf4930e 100644 --- a/src/Module/Api/Mastodon/Timelines/Home.php +++ b/src/Module/Api/Mastodon/Timelines/Home.php @@ -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(); diff --git a/src/Module/Api/Mastodon/Timelines/ListTimeline.php b/src/Module/Api/Mastodon/Timelines/ListTimeline.php index 378e3eeaaf..a8de13056e 100644 --- a/src/Module/Api/Mastodon/Timelines/ListTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/ListTimeline.php @@ -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(); diff --git a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php index 083d9867ed..968e34dbb9 100644 --- a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php @@ -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();