mirror of
https://github.com/friendica/friendica
synced 2024-12-23 10:00:20 +00:00
Merge pull request #10310 from annando/issue-10287-again
Issue 10287: Don't show ignored and blocked posts
This commit is contained in:
commit
cf6f9d6c60
4 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Friendica 2021.06-rc (Siberian Iris)
|
-- Friendica 2021.06-rc (Siberian Iris)
|
||||||
-- DB_UPDATE_VERSION 1419
|
-- DB_UPDATE_VERSION 1420
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@ -1685,7 +1685,9 @@ CREATE VIEW `post-user-view` AS SELECT
|
||||||
`parent-post`.`author-id` AS `parent-author-id`,
|
`parent-post`.`author-id` AS `parent-author-id`,
|
||||||
`parent-post-author`.`url` AS `parent-author-link`,
|
`parent-post-author`.`url` AS `parent-author-link`,
|
||||||
`parent-post-author`.`name` AS `parent-author-name`,
|
`parent-post-author`.`name` AS `parent-author-name`,
|
||||||
`parent-post-author`.`network` AS `parent-author-network`
|
`parent-post-author`.`network` AS `parent-author-network`,
|
||||||
|
`parent-post-author`.`blocked` AS `parent-author-blocked`,
|
||||||
|
`parent-post-author`.`hidden` AS `parent-author-hidden`
|
||||||
FROM `post-user`
|
FROM `post-user`
|
||||||
STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`
|
STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`
|
||||||
STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-user`.`contact-id`
|
STRAIGHT_JOIN `contact` ON `contact`.`id` = `post-user`.`contact-id`
|
||||||
|
|
|
@ -58,7 +58,7 @@ class PublicTimeline extends BaseApi
|
||||||
$params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
|
$params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
|
||||||
|
|
||||||
$condition = ['gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT], 'private' => Item::PUBLIC,
|
$condition = ['gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT], 'private' => Item::PUBLIC,
|
||||||
'uid' => 0, 'network' => Protocol::FEDERATED];
|
'uid' => 0, 'network' => Protocol::FEDERATED, 'parent-author-blocked' => false, 'parent-author-hidden' => false];
|
||||||
|
|
||||||
if ($request['local']) {
|
if ($request['local']) {
|
||||||
$condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE `origin`)"]);
|
$condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE `origin`)"]);
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1419);
|
define('DB_UPDATE_VERSION', 1420);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -196,6 +196,8 @@
|
||||||
"parent-author-link" => ["parent-post-author", "url"],
|
"parent-author-link" => ["parent-post-author", "url"],
|
||||||
"parent-author-name" => ["parent-post-author", "name"],
|
"parent-author-name" => ["parent-post-author", "name"],
|
||||||
"parent-author-network" => ["parent-post-author", "network"],
|
"parent-author-network" => ["parent-post-author", "network"],
|
||||||
|
"parent-author-blocked" => ["parent-post-author", "blocked"],
|
||||||
|
"parent-author-hidden" => ["parent-post-author", "hidden"],
|
||||||
],
|
],
|
||||||
"query" => "FROM `post-user`
|
"query" => "FROM `post-user`
|
||||||
STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`
|
STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`
|
||||||
|
|
Loading…
Reference in a new issue