From 55236f86e06ded054a58c36e52b9a32a19affb46 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 13 Feb 2024 11:19:28 +0000 Subject: move the empty recips check to store(). otherwise it might interfere with zot6 native addressing which is always empty --- Zotlabs/Lib/Activity.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 08fd6ee05..0f76fce9a 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -2601,7 +2601,7 @@ class Activity { $s['item_private'] = 0; } - if ($act->objprop('directMessage') || empty($act->recips)) { + if ($act->objprop('directMessage')) { $s['item_private'] = 2; } @@ -2712,13 +2712,13 @@ class Activity { $item['owner_xchan'] = $observer_hash; } - // An ugly and imperfect way to recognise a mastodon direct message - if ( - $item['item_private'] === 1 && + // An ugly and imperfect way to recognise a mastodon or friendica direct message + if (empty($act->recips) || // friendica + ($item['item_private'] === 1 && !isset($act->raw_recips['cc']) && is_array($act->raw_recips['to']) && in_array(channel_url($channel), $act->raw_recips['to']) && - !in_array($act->actor['followers'], $act->raw_recips['to']) + !in_array($act->actor['followers'], $act->raw_recips['to'])) ) { $item['item_private'] = 2; } -- cgit v1.2.3