aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Activity.php14
-rw-r--r--Zotlabs/Module/Item.php14
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' => [