Remove explicit block filtering for results that go through selectViewForUser

This commit is contained in:
Hank Grabowski 2023-02-16 16:06:56 -05:00
parent a4515daca4
commit e3bfb39e91
3 changed files with 0 additions and 19 deletions

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

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

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