mirror of
https://github.com/friendica/friendica
synced 2024-11-12 22:22:54 +00:00
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
|
@ -73,6 +73,13 @@ class Context extends BaseApi
|
||||||
$condition = DBA::mergeConditions($condition, ["`uri-id` > ?", $request['min_id']]);
|
$condition = DBA::mergeConditions($condition, ["`uri-id` > ?", $request['min_id']]);
|
||||||
$params['order'] = ['uri-id'];
|
$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);
|
$posts = Post::selectPosts(['uri-id', 'thr-parent-id'], $condition, $params);
|
||||||
while ($post = Post::fetch($posts)) {
|
while ($post = Post::fetch($posts)) {
|
||||||
|
|
Loading…
Reference in a new issue