aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-26 10:35:24 +0000
committerMario <mario@mariovavti.com>2021-01-26 10:35:24 +0000
commitf0ee4c3cef6c148bd397ad6a1e71ce86aa43565a (patch)
treecd0608b6ba5faeccce7d63df4362e990357e8b7b
parent6878445319374c3d98932b26a3a58a99c754df8f (diff)
downloadvolse-hubzilla-f0ee4c3cef6c148bd397ad6a1e71ce86aa43565a.tar.gz
volse-hubzilla-f0ee4c3cef6c148bd397ad6a1e71ce86aa43565a.tar.bz2
volse-hubzilla-f0ee4c3cef6c148bd397ad6a1e71ce86aa43565a.zip
port fix from zap: catch a complex edge case where some public stream comments were not being delivered and should have been
-rw-r--r--Zotlabs/Lib/Activity.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 8ad114a4d..388d74d91 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -292,7 +292,7 @@ class Activity {
$ret = [
'id' => z_root() . '/' . $id,
'type' => $type,
- 'totalItems' => count($items),
+ 'totalItems' => $total,
];
}
@@ -2525,6 +2525,9 @@ class Activity {
intval($channel['channel_id'])
);
if ($p) {
+ // set the owner to the owner of the parent
+ $item['owner_xchan'] = $p[0]['owner_xchan'];
+
// check permissions against the author, not the sender
$allowed = perm_is_allowed($channel['channel_id'], $item['author_xchan'], 'post_comments');
if ((!$allowed)/* && $permit_mentions*/) {
@@ -2560,9 +2563,8 @@ class Activity {
$allowed = true;
// reject public stream comments that weren't sent by the conversation owner
- if ($is_sys_channel && $pubstream && $item['owner_xchan'] !== $observer_hash) {
- // TODO: check why? This would make it impossible to fetch externals via zotfeed where $observer_hash = sys channel
- // $allowed = false;
+ if ($is_sys_channel && $pubstream && $item['owner_xchan'] !== $observer_hash && ! $fetch_parents) { // TODO: check why? This would make it impossible to fetch externals via zotfeed where $observer_hash = sys channel
+ $allowed = false;
}
}