]> git.mxchange.org Git - friendica.git/commitdiff
Issue 9268: Don't show posts from followers on community page
authorMichael <heluecht@pirati.ca>
Sat, 26 Sep 2020 09:09:56 +0000 (09:09 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 26 Sep 2020 09:09:56 +0000 (09:09 +0000)
src/Module/Conversation/Community.php
static/defaults.config.php

index c86bf9176c116b272d940f6d729143c0af095f01..8be5361deb3bc49e2e859103e220c680a02c5f29 100644 (file)
@@ -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;
index c1d6fff044e518206e1ed01f282f643013a9ec69..00255ff14cf6c8cc958f87bb59b785a477b7b184 100644 (file)
@@ -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,