diff options
author | Mario <mario@mariovavti.com> | 2021-01-26 12:11:01 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-01-26 12:11:01 +0000 |
commit | 74f8f2d956a24fbff04c3feeec50466bb3aea931 (patch) | |
tree | 406d2e57343f727a3973d31df836f9b9ea5080a8 /Zotlabs | |
parent | f0ee4c3cef6c148bd397ad6a1e71ce86aa43565a (diff) | |
download | volse-hubzilla-74f8f2d956a24fbff04c3feeec50466bb3aea931.tar.gz volse-hubzilla-74f8f2d956a24fbff04c3feeec50466bb3aea931.tar.bz2 volse-hubzilla-74f8f2d956a24fbff04c3feeec50466bb3aea931.zip |
thread listener improvements
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Activity.php | 14 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 14 |
2 files changed, 22 insertions, 6 deletions
diff --git a/Zotlabs/Module/Activity.php b/Zotlabs/Module/Activity.php index b75f0b245..48f2663cf 100644 --- a/Zotlabs/Module/Activity.php +++ b/Zotlabs/Module/Activity.php @@ -143,8 +143,8 @@ class Activity extends Controller { http_status_exit(403, 'Forbidden'); $i = ZlibActivity::encode_item_collection($nitems,'conversation/' . $item_id,'OrderedCollection'); - if($portable_id) { - ThreadListener::store(z_root() . '/activity/' . $item_id,$portable_id); + if($portable_id && (! intval($items[0]['item_private']))) { + ThreadListener::store(z_root() . '/activity/' . $item_id, $portable_id); } if(! $i) @@ -239,6 +239,16 @@ class Activity extends Controller { xchan_query($r,true); $items = fetch_post_tags($r,false); + if ($portable_id && (! intval($items[0]['item_private']))) { + $c = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s'", + intval($items[0]['uid']), + dbesc($portable_id) + ); + if (! $c) { + ThreadListener::store(z_root() . '/activity/' . $item_id, $portable_id); + } + } + $channel = channelx_by_n($items[0]['uid']); $x = array_merge( ['@context' => [ diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 3d83bcf8f..b30adeb53 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -136,8 +136,8 @@ class Item extends Controller { if(! $i) http_status_exit(404, 'Not found'); - if($portable_id) { - ThreadListener::store(z_root() . '/item/' . $item_id,$portable_id); + if($portable_id && (! intval($items[0]['item_private']))) { + ThreadListener::store(z_root() . '/item/' . $item_id, $portable_id); } $x = array_merge(['@context' => [ @@ -238,8 +238,14 @@ class Item extends Controller { if(! $i) http_status_exit(404, 'Not found'); - if($portable_id) { - ThreadListener::store(z_root() . '/item/' . $item_id, $portable_id); + if ($portable_id && (! intval($items[0]['item_private']))) { + $c = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s'", + intval($items[0]['uid']), + dbesc($portable_id) + ); + if (! $c) { + ThreadListener::store(z_root() . '/item/' . $item_id, $portable_id); + } } $x = array_merge(['@context' => [ |