aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-08-21 10:07:51 +0200
committerMario Vavti <mario@mariovavti.com>2023-08-21 10:07:51 +0200
commit816bbad28a6292be1c697fe3ac4073f3f110dc10 (patch)
treebaf7c3d0cc4ac047555b71bf8ce97d2a6e2860d0 /Zotlabs/Lib/Activity.php
parentce4150cd06a5eb3995592b7c3898d980a58d3dd6 (diff)
downloadvolse-hubzilla-816bbad28a6292be1c697fe3ac4073f3f110dc10.tar.gz
volse-hubzilla-816bbad28a6292be1c697fe3ac4073f3f110dc10.tar.bz2
volse-hubzilla-816bbad28a6292be1c697fe3ac4073f3f110dc10.zip
allow public stream comments/reactions if item_fetched is set, when fetching parent of a reaction fetch the thr_parent
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 49628c24b..532bbba45 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2277,6 +2277,7 @@ class Activity {
}
static function decode_note($act) {
+
$response_activity = false;
$s = [];
@@ -3003,7 +3004,7 @@ class Activity {
$allowed = true;
// reject public stream comments that weren't sent by the conversation owner
- if ($is_sys_channel && $item['owner_xchan'] !== $observer_hash && !$fetch_parents) {
+ if ($is_sys_channel && $item['owner_xchan'] !== $observer_hash && !$fetch_parents && empty($item['item_fetched'])) {
$allowed = false;
}
}
@@ -3139,8 +3140,6 @@ class Activity {
$fetch = false;
- // TODO: debug
- // if (perm_is_allowed($channel['channel_id'],$observer_hash,'send_stream') && (PConfig::Get($channel['channel_id'],'system','hyperdrive',true) || $act->type === 'Announce')) {
if (perm_is_allowed($channel['channel_id'], $observer_hash, 'send_stream') || $is_sys_channel) {
$fetch = (($fetch_parents) ? self::fetch_and_store_parents($channel, $observer_hash, $item, $force) : false);
}
@@ -3285,7 +3284,7 @@ class Activity {
$current_item = $item;
while ($current_item['parent_mid'] !== $current_item['mid']) {
- $n = self::fetch($current_item['parent_mid'], $channel);
+ $n = self::fetch(((in_array($current_item['verb'], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) ? $current_item['thr_parent'] : $current_item['parent_mid']), $channel);
if (!$n) {
break;