]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Processor.php
Merge pull request #10372 from annando/forum-handling
[friendica.git] / src / Protocol / ActivityPub / Processor.php
index ecbecb9551b5b8f5ad1ece9cb95f0caa6b5ba1ad..5c53f27000ae934482ffdd09c56b80cb28dc3358 100644 (file)
@@ -602,6 +602,12 @@ class Processor
                                continue;
                        }
 
+                       if (!($item['isForum'] ?? false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT) &&
+                               ($item['post-reason'] == Item::PR_BCC) && !Contact::isSharingByURL($activity['author'], $receiver)) {
+                               Logger::info('Top level post via BCC from a non sharer, ignoring', ['uid' => $receiver, 'contact' => $item['contact-id']]);
+                               continue;
+                       }
+
                        if (DI::pConfig()->get($receiver, 'system', 'accept_only_sharer', false) && ($receiver != 0) && ($item['gravity'] == GRAVITY_PARENT)) {
                                $skip = !Contact::isSharingByURL($activity['author'], $receiver);