From b522f20702e49a71e9620035a5e6f63951d91c06 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 26 Sep 2020 09:09:56 +0000 Subject: [PATCH] Issue 9268: Don't show posts from followers on community page --- src/Module/Conversation/Community.php | 5 +++++ static/defaults.config.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/Module/Conversation/Community.php b/src/Module/Conversation/Community.php index c86bf9176c..8be5361deb 100644 --- a/src/Module/Conversation/Community.php +++ b/src/Module/Conversation/Community.php @@ -295,6 +295,11 @@ class Community extends BaseModule return []; } + if (local_user() && DI::config()->get('system', 'community_no_followers')) { + $condition[0] .= " AND NOT EXISTS (SELECT `uri-id` FROM `thread` AS t1 WHERE `t1`.`uri-id` = `thread`.`uri-id` AND `t1`.`uid` = ?)"; + $condition[] = local_user(); + } + if (isset($max_id)) { $condition[0] .= " AND `commented` < ?"; $condition[] = $max_id; diff --git a/static/defaults.config.php b/static/defaults.config.php index c1d6fff044..00255ff14c 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -122,6 +122,10 @@ return [ // Deny public access to the local user directory. 'block_local_dir' => false, + // community_no_followers (Boolean) + // Don't display followers on the global community + 'community_no_followers' => false, + // cron_interval (Integer) // Minimal period in minutes between two calls of the "Cron" worker job. 'cron_interval' => 5,