From 395764dd6d69d4678070ec6fa3a58f55dc55eec9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 30 Nov 2021 08:24:09 -0500 Subject: [PATCH] Prevent API-submitted public pictures to be published as statuses --- include/api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index a35da5c524..6fa0aeea6f 100644 --- a/include/api.php +++ b/include/api.php @@ -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