aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2023-08-21 10:07:51 +0200
committerMario <mario@mariovavti.com>2023-08-27 20:00:30 +0200
commit05ff94941c4aaeb0c9d1eeda64d5af0071ea64b9 (patch)
treeae05bb3ccb9706ad3f4ca8036493118c50b6916b
parenta27d75d610f286db81d5e1e29a35b960ef872a89 (diff)
downloadvolse-hubzilla-05ff94941c4aaeb0c9d1eeda64d5af0071ea64b9.tar.gz
volse-hubzilla-05ff94941c4aaeb0c9d1eeda64d5af0071ea64b9.tar.bz2
volse-hubzilla-05ff94941c4aaeb0c9d1eeda64d5af0071ea64b9.zip
allow public stream comments/reactions if item_fetched is set, when fetching parent of a reaction fetch the thr_parent
(cherry picked from commit 816bbad28a6292be1c697fe3ac4073f3f110dc10)
-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 992ade200..8066b1857 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2281,6 +2281,7 @@ class Activity {
}
static function decode_note($act) {
+
$response_activity = false;
$s = [];
@@ -3007,7 +3008,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;
}
}
@@ -3143,8 +3144,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);
}
@@ -3289,7 +3288,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;