]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Only perform OAuth when no login data are provided
[friendica.git] / mod / item.php
index 2e5a08203621c94c9d90cf7e77506096ab08336d..a9f1ef808baad0daf07f45f6504851967bb25db1 100644 (file)
@@ -300,7 +300,13 @@ function item_post(App $a) {
 
                $postopts = $_REQUEST['postopts'] ?? '';
 
-               $private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
+               if (strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) {
+                       $private = Item::PRIVATE;
+               } elseif (DI::pConfig()->get($profile_uid, 'system', 'unlisted')) {
+                       $private = Item::UNLISTED;
+               } else {
+                       $private = Item::PUBLIC;
+               }
 
                // If this is a comment, set the permissions from the parent.