From e3bfb39e917ff553b97507753be85f431e8b6d54 Mon Sep 17 00:00:00 2001
From: Hank Grabowski <hankgrabowski@gmail.com>
Date: Thu, 16 Feb 2023 16:06:56 -0500
Subject: [PATCH] Remove explicit block filtering for results that go through
 selectViewForUser

---
 src/Module/Api/Mastodon/Timelines/Home.php           | 7 -------
 src/Module/Api/Mastodon/Timelines/ListTimeline.php   | 7 -------
 src/Module/Api/Mastodon/Timelines/PublicTimeline.php | 5 -----
 3 files changed, 19 deletions(-)

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();