aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-26 12:11:01 +0000
committerMario <mario@mariovavti.com>2021-01-26 12:11:01 +0000
commit74f8f2d956a24fbff04c3feeec50466bb3aea931 (patch)
tree406d2e57343f727a3973d31df836f9b9ea5080a8 /Zotlabs/Module/Activity.php
parentf0ee4c3cef6c148bd397ad6a1e71ce86aa43565a (diff)
downloadvolse-hubzilla-74f8f2d956a24fbff04c3feeec50466bb3aea931.tar.gz
volse-hubzilla-74f8f2d956a24fbff04c3feeec50466bb3aea931.tar.bz2
volse-hubzilla-74f8f2d956a24fbff04c3feeec50466bb3aea931.zip
thread listener improvements
Diffstat (limited to 'Zotlabs/Module/Activity.php')
-rw-r--r--Zotlabs/Module/Activity.php14
1 files changed, 12 insertions, 2 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' => [