]> git.mxchange.org Git - friendica.git/commitdiff
Respect the "unlisted" setting for forum posts
authorMichael <heluecht@pirati.ca>
Sun, 6 Jun 2021 09:19:29 +0000 (09:19 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 6 Jun 2021 09:19:29 +0000 (09:19 +0000)
src/Model/Item.php

index f85bce5e8fcda0926657cf8864293777f76e8925..0d7df891e2d5db11796a8a57dde0252ccd2ce232 100644 (file)
@@ -1918,8 +1918,13 @@ class Item
                $owner_id = Contact::getIdForURL($self['url']);
 
                // also reset all the privacy bits to the forum default permissions
-
-               $private = ($user['allow_cid'] || $user['allow_gid'] || $user['deny_cid'] || $user['deny_gid']) ? self::PRIVATE : self::UNLISTED;
+               if ($user['allow_cid'] || $user['allow_gid'] || $user['deny_cid'] || $user['deny_gid']) {
+                       $private = self::PRIVATE;
+               } elseif (DI::pConfig()->get($user['uid'], 'system', 'unlisted')) {
+                       $private = Item::UNLISTED;
+               } else {
+                       $private = Item::PUBLIC;
+               }
 
                $psid = PermissionSet::getIdFromACL(
                        $user['uid'],