From 304d13643786049e29d3866ec45fec79c744c10b Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 13 May 2022 19:13:47 +0000 Subject: do not set allowed to true if verb is ACTIVITY_SHARE and slightly changed logic for conv fetches --- Zotlabs/Lib/Libzot.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Lib/Libzot.php') diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 379b329c7..8eb5ce647 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1627,7 +1627,7 @@ class Libzot { // doesn't exist. if ($perm === 'send_stream') { - if ($force || get_pconfig($channel['channel_id'], 'system', 'hyperdrive', false) || $arr['verb'] === ACTIVITY_SHARE) { + if ($force || get_pconfig($channel['channel_id'], 'system', 'hyperdrive', false)) { $allowed = true; } } @@ -1673,6 +1673,10 @@ class Libzot { $DR->update('comment parent not found'); $result[] = $DR->get(); + if ($relay || $request || $local_public) { + continue; + } + // We don't seem to have a copy of this conversation or at least the parent // - so request a copy of the entire conversation to date. // Don't do this if it's a relay post as we're the ones who are supposed to @@ -1684,10 +1688,10 @@ class Libzot { // the top level post is unlikely to be imported and // this is just an exercise in futility. - if ((!$relay) && (!$request) && (!$local_public) - && perm_is_allowed($channel['channel_id'], $sender, 'send_stream')) { + if (perm_is_allowed($channel['channel_id'], $sender, 'send_stream')) { self::fetch_conversation($channel, $arr['parent_mid']); } + continue; } -- cgit v1.2.3