Add to Mastodon Status/Context filter for ignored and blocked user's comments
This commit is contained in:
parent
b1b3b0ffe7
commit
3958739d60
1 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,13 @@ class Context extends BaseApi
|
|||
$params['order'] = ['uri-id'];
|
||||
}
|
||||
|
||||
if (!empty($uid)) {
|
||||
$condition = DBA::mergeConditions(
|
||||
$condition,
|
||||
["NOT `author-id` IN (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND (`blocked` OR `ignored`))", $uid]
|
||||
);
|
||||
}
|
||||
|
||||
$posts = Post::selectPosts(['uri-id', 'thr-parent-id'], $condition, $params);
|
||||
while ($post = Post::fetch($posts)) {
|
||||
if ($post['uri-id'] == $post['thr-parent-id']) {
|
||||
|
|
Loading…
Reference in a new issue