From a02a3eb40251e0b59bcf1d8811974a6f2961b526 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sun, 17 Sep 2023 07:41:26 +1000 Subject: [PATCH] Issue #93 --- Code/Lib/Activity.php | 2 +- Code/Module/Item.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Code/Lib/Activity.php b/Code/Lib/Activity.php index 75937ee5a..4656f38c9 100644 --- a/Code/Lib/Activity.php +++ b/Code/Lib/Activity.php @@ -1456,7 +1456,7 @@ class Activity if (isset($parent_i['cc']) && is_array($parent_i['cc'])) { $activity['cc'] = array_values(array_unique(array_merge($activity['cc'], $parent_i['cc']))); } - if ($activity['tag']) { + if ($activity['tag']) { // @fixme (these are activitypub tags, not platform tags - there is no ttype) foreach ($activity['tag'] as $mention) { if (is_array($mention) && array_key_exists('ttype', $mention) && in_array($mention['ttype'], [TERM_FORUM, TERM_MENTION]) && array_key_exists('href', $mention) && $mention['href']) { $h = hubloc_id_query($mention['href'], 1); diff --git a/Code/Module/Item.php b/Code/Module/Item.php index 76a23d9e7..f0b2c8f58 100644 --- a/Code/Module/Item.php +++ b/Code/Module/Item.php @@ -799,6 +799,11 @@ class Item extends Controller // webpages and unpublished drafts are allowed to change ACLs after the fact. Normal conversation items aren't. if ($webpage || intval($orig_post['item_unpublished'])) { $acl->set_from_array($_REQUEST); + // However, draft comments should inherit the original item_private since the ACL is empty. + if ($orig_post['item_private'] && $orig_post['mid'] !== $orig_post['parent_mid']) { + $private = $orig_post['item_private']; + } + } else { $acl->set($orig_post); $public_policy = $orig_post['public_policy'];