diff options
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 14 |
1 files changed, 10 insertions, 4 deletions
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' => [ |