]> git.mxchange.org Git - friendica.git/commitdiff
Prevent API-submitted public pictures to be published as statuses
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 30 Nov 2021 13:24:09 +0000 (08:24 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 30 Nov 2021 13:24:09 +0000 (08:24 -0500)
include/api.php

index a35da5c5245e816c9aba3c9924fdf6f5ddbff7dd..6fa0aeea6f87cc9e4b77fc42d1065bf6008cce3e 100644 (file)
@@ -1333,7 +1333,9 @@ function api_fr_photo_create_update($type)
        $deny_cid  = $_REQUEST['deny_cid' ] ?? null;
        $allow_gid = $_REQUEST['allow_gid'] ?? null;
        $deny_gid  = $_REQUEST['deny_gid' ] ?? null;
-       $visibility = !$allow_cid && !$deny_cid && !$allow_gid && !$deny_gid;
+       // Pictures uploaded via API never get posted as a visible status
+       // See https://github.com/friendica/friendica/issues/10990
+       $visibility = false;
 
        // do several checks on input parameters
        // we do not allow calls without album string