aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-12-15 12:17:19 +0000
committerMario <mario@mariovavti.com>2021-12-15 12:17:19 +0000
commit2968bf8241d2969c4d51f1651fc3f8c7688b2fca (patch)
treedb015d27098c546c32f41682e3b7dac2480b890e /Zotlabs/Daemon
parentb37165c62b1037e504d4b68a507241acf97ede5e (diff)
downloadvolse-hubzilla-2968bf8241d2969c4d51f1651fc3f8c7688b2fca.tar.gz
volse-hubzilla-2968bf8241d2969c4d51f1651fc3f8c7688b2fca.tar.bz2
volse-hubzilla-2968bf8241d2969c4d51f1651fc3f8c7688b2fca.zip
merge branch perms_ng into dev
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r--Zotlabs/Daemon/Notifier.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 4ca109495..23bddae8f 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -630,6 +630,18 @@ class Notifier {
// default: zot protocol
+ // Prevent zot6 delivery of group comment boosts, which are not required for conversational platforms.
+ // ActivityPub conversational platforms may wish to filter these if they don't want or require them.
+ // We will assume here that if $target_item exists and has a verb that it is an actual item structure
+ // so we won't need to check the existence of the other item fields prior to evaluation.
+
+ // This shouldn't produce false positives on comment boosts that were generated on other platforms
+ // because we won't be delivering them.
+
+ if (isset($target_item) && isset($target_item['verb']) && $target_item['verb'] === 'Announce' && $target_item['author_xchan'] === $target_item['owner_xchan'] && ! intval($target_item['item_thread_top'])) {
+ continue;
+ }
+
$hash = new_uuid();
$env = (($hub_env && $hub_env[$hub['hubloc_site_id']]) ? $hub_env[$hub['hubloc_site_id']] : '');