diff options
author | zotlabs <mike@macgirvin.com> | 2019-06-19 17:32:38 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-06-19 17:32:38 -0700 |
commit | 9d156141b1205e48bbb3008f2a3040caa4c33192 (patch) | |
tree | e3931bb66439f751b89b0063334c011872430bab /include/items.php | |
parent | becaa3b920bfe87c031c01bdf35d35db5c82e31e (diff) | |
download | volse-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 'include/items.php')
-rwxr-xr-x | include/items.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/items.php b/include/items.php index 95b696034..26a74fd86 100755 --- a/include/items.php +++ b/include/items.php @@ -1984,11 +1984,12 @@ function item_store($arr, $allow_exec = false, $deliver = true) { unset($arr['iconfig']); } - - if(strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid) || strlen($public_policy)) - $private = 1; - else - $private = $arr['item_private']; + $private = intval($arr['item_private']); + if (! $private) { + if (strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid)) { + $private = 1; + } + } $arr['parent'] = $parent_id; $arr['allow_cid'] = $allow_cid; @@ -4620,12 +4621,12 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, if(strpos($access_tag,'cid:') === 0) { $str_contact_allow .= '<' . substr($access_tag,4) . '>'; $access_tag = ''; - $private = 1; + $private = 2; } elseif(strpos($access_tag,'gid:') === 0) { $str_group_allow .= '<' . substr($access_tag,4) . '>'; $access_tag = ''; - $private = 1; + $private = 2; } } } |