aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-02-13 11:19:28 +0000
committerMario <mario@mariovavti.com>2024-02-13 11:19:28 +0000
commit55236f86e06ded054a58c36e52b9a32a19affb46 (patch)
treeb8a23a120cbc13ccf3c9c3b54599a5690e4e3599 /Zotlabs/Lib/Activity.php
parent060210e930e54ab7894c853dadc4978ad97b296b (diff)
downloadvolse-hubzilla-55236f86e06ded054a58c36e52b9a32a19affb46.tar.gz
volse-hubzilla-55236f86e06ded054a58c36e52b9a32a19affb46.tar.bz2
volse-hubzilla-55236f86e06ded054a58c36e52b9a32a19affb46.zip
move the empty recips check to store(). otherwise it might interfere with zot6 native addressing which is always empty
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php10
1 files changed, 5 insertions, 5 deletions
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;
}