diff options
author | Mario <mario@mariovavti.com> | 2021-09-06 09:38:41 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-06 09:38:41 +0000 |
commit | 97ef781a0f9bf01984b732787239e306d6ba7ec9 (patch) | |
tree | 6f58e002b544246b008804f607aa6ba169258f60 | |
parent | 81351d295206fadf42ae207a6a4ba12cb3f48e2a (diff) | |
download | volse-hubzilla-97ef781a0f9bf01984b732787239e306d6ba7ec9.tar.gz volse-hubzilla-97ef781a0f9bf01984b732787239e306d6ba7ec9.tar.bz2 volse-hubzilla-97ef781a0f9bf01984b732787239e306d6ba7ec9.zip |
fix post mail check in Activity::create_note()
-rw-r--r-- | Zotlabs/Lib/Activity.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 14d4a1d71..62a22f70e 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1821,7 +1821,15 @@ class Activity { $s['owner_xchan'] = $s['author_xchan'] = $observer_hash; } - if (intval($item['item_private']) === 2) { + if ($act->recips && (!in_array(ACTIVITY_PUBLIC_INBOX, $act->recips))) + $s['item_private'] = 1; + + + if (array_key_exists('directMessage', $act->obj) && intval($act->obj['directMessage'])) { + $s['item_private'] = 2; + } + + if (intval($s['item_private']) === 2) { if (!perm_is_allowed($channel['channel_id'], $observer_hash, 'post_mail')) { logger('no post_mail permission'); return; @@ -1976,14 +1984,6 @@ class Activity { } } - if ($act->recips && (!in_array(ACTIVITY_PUBLIC_INBOX, $act->recips))) - $s['item_private'] = 1; - - - if (array_key_exists('directMessage', $act->obj) && intval($act->obj['directMessage'])) { - $s['item_private'] = 2; - } - set_iconfig($s, 'activitypub', 'recips', $act->raw_recips); if ($parent) { set_iconfig($s, 'activitypub', 'rawmsg', $act->raw, 1); |