aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-01-15 21:43:47 +0000
committerMario <mario@mariovavti.com>2020-01-15 21:43:47 +0000
commit2a0a06d74aa1e51b0e50459f90167ab35ba1411b (patch)
treee078f0a93779cb5f156c0f56b9df574bdad744ab /Zotlabs/Lib
parentccaa93655a6b44834d04c536d809c4b2c69c354b (diff)
downloadvolse-hubzilla-2a0a06d74aa1e51b0e50459f90167ab35ba1411b.tar.gz
volse-hubzilla-2a0a06d74aa1e51b0e50459f90167ab35ba1411b.tar.bz2
volse-hubzilla-2a0a06d74aa1e51b0e50459f90167ab35ba1411b.zip
some work on zot6 DMs
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php8
-rw-r--r--Zotlabs/Lib/Libzot.php4
2 files changed, 9 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index a99bb36e4..43315a87f 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1989,9 +1989,15 @@ class Activity {
$s['plink'] = $s['mid'];
}
- if($act->recips && (! in_array(ACTIVITY_PUBLIC_INBOX,$act->recips)))
+ if ($act->recips && (! in_array(ACTIVITY_PUBLIC_INBOX,$act->recips)))
$s['item_private'] = 1;
+ if (is_array($act->obj)) {
+ if (array_key_exists('directMessage',$act->obj) && intval($act->obj['directMessage'])) {
+ $s['item_private'] = 2;
+ }
+ }
+
set_iconfig($s,'activitypub','recips',$act->raw_recips);
$parent = (($s['parent_mid'] && $s['parent_mid'] === $s['mid']) ? true : false);
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 100d45c05..ad00aa97a 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1220,8 +1220,8 @@ class Libzot {
$arr['owner_xchan'] = $env['sender'];
}
- if($private) {
- $arr['item_private'] = true;
+ if ($private && (! intval($arr['item_private']))) {
+ $arr['item_private'] = 1;
}
if ($arr['mid'] === $arr['parent_mid']) {