aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-06-19 17:32:38 -0700
committerzotlabs <mike@macgirvin.com>2019-06-19 17:32:38 -0700
commit9d156141b1205e48bbb3008f2a3040caa4c33192 (patch)
treee3931bb66439f751b89b0063334c011872430bab /Zotlabs/Lib/Activity.php
parentbecaa3b920bfe87c031c01bdf35d35db5c82e31e (diff)
downloadvolse-hubzilla-9d156141b1205e48bbb3008f2a3040caa4c33192.tar.gz
volse-hubzilla-9d156141b1205e48bbb3008f2a3040caa4c33192.tar.bz2
volse-hubzilla-9d156141b1205e48bbb3008f2a3040caa4c33192.zip
changes to support direct messages in zot6 (set item.item_private = 2 when private mentions are used and federate with zot:directMessage attribute which aligns with litepub:directMessage)
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 331e4f777..912b74a70 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -312,6 +312,10 @@ class Activity {
}
}
+ if (intval($i['item_private']) === 2) {
+ $ret['directMessage'] = true;
+ }
+
$ret['attributedTo'] = $i['author']['xchan_url'];
if($i['id'] != $i['parent']) {
@@ -1415,6 +1419,11 @@ 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);