Set different permissions for comments via API

This commit is contained in:
Michael 2023-03-24 20:39:11 +00:00
parent 08d1e484e3
commit 8a55ce2415
3 changed files with 10 additions and 9 deletions

View file

@ -548,7 +548,7 @@ class Item
$item['allow_cid'] = '';
$item['allow_gid'] = '';
}
} elseif ($setPermissions && ($item['gravity'] == ItemModel::GRAVITY_PARENT)) {
} elseif ($setPermissions) {
if (empty($receivers)) {
// For security reasons direct posts without any receiver will be posts to yourself
$self = Contact::selectFirst(['id'], ['uid' => $item['uid'], 'self' => true]);