]> git.mxchange.org Git - friendica.git/commitdiff
Issue 10287: Don't show ignored and blocked posts
authorMichael <heluecht@pirati.ca>
Mon, 24 May 2021 10:51:21 +0000 (10:51 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 24 May 2021 10:51:21 +0000 (10:51 +0000)
database.sql
src/Module/Api/Mastodon/Timelines/PublicTimeline.php
static/dbstructure.config.php
static/dbview.config.php

index 3e6d398cf1b9b9fe5a960e41550a4cf972ea91b1..202d5365523d77b093bc95ef0ad8ff11ffe55683 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- 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`.`url` AS `parent-author-link`,
        `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`
                        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`
index 113a5cac2e6ab95fec20ea0d4eb7c2631369e542..1efeabba8042958ce74fa9fee03f30cfcccb688f 100644 (file)
@@ -58,7 +58,7 @@ class PublicTimeline extends BaseApi
                $params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
 
                $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']) {
                        $condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE `origin`)"]);
index 14b7814c0923df0c068dc646460ba19d3de0f700..e3b1bea30c6b4695261025de68d8c9e22de9cb36 100644 (file)
@@ -55,7 +55,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1419);
+       define('DB_UPDATE_VERSION', 1420);
 }
 
 return [
index 488cbceaa2662e3c07ff92ddd4c8c6f5ea3048b5..1582890e01169f24315add222f52ca3a381abb12 100644 (file)
                        "parent-author-link" => ["parent-post-author", "url"],
                        "parent-author-name" => ["parent-post-author", "name"],
                        "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`
                        STRAIGHT_JOIN `post-thread-user` ON `post-thread-user`.`uri-id` = `post-user`.`parent-uri-id` AND `post-thread-user`.`uid` = `post-user`.`uid`