This commit is contained in:
Mike Macgirvin 2023-09-17 07:41:26 +10:00
parent 0b159c36ba
commit a02a3eb402
2 changed files with 6 additions and 1 deletions

View file

@ -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);

View file

@ -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'];