mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Add show_all option to Mastodon status context to show ignored and blocked statuses
This commit is contained in:
parent
3958739d60
commit
b06a3e877e
1 changed files with 6 additions and 5 deletions
|
@ -49,6 +49,7 @@ class Context extends BaseApi
|
||||||
'since_id' => 0, // Return results newer than this id
|
'since_id' => 0, // Return results newer than this id
|
||||||
'min_id' => 0, // Return results immediately newer than this id
|
'min_id' => 0, // Return results immediately newer than this id
|
||||||
'limit' => 40, // Maximum number of results to return. Defaults to 40.
|
'limit' => 40, // Maximum number of results to return. Defaults to 40.
|
||||||
|
'show_all' => false, // shows posts for all users including blocked and ignored users
|
||||||
], $request);
|
], $request);
|
||||||
|
|
||||||
$id = $this->parameters['id'];
|
$id = $this->parameters['id'];
|
||||||
|
@ -74,7 +75,7 @@ class Context extends BaseApi
|
||||||
$params['order'] = ['uri-id'];
|
$params['order'] = ['uri-id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($uid)) {
|
if (!empty($uid) && !$request['show_all']) {
|
||||||
$condition = DBA::mergeConditions(
|
$condition = DBA::mergeConditions(
|
||||||
$condition,
|
$condition,
|
||||||
["NOT `author-id` IN (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND (`blocked` OR `ignored`))", $uid]
|
["NOT `author-id` IN (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND (`blocked` OR `ignored`))", $uid]
|
||||||
|
|
Loading…
Reference in a new issue