]> git.mxchange.org Git - friendica.git/commitdiff
ignore "follow" activities that are not from the user
authorMichael <heluecht@pirati.ca>
Wed, 6 May 2020 21:19:48 +0000 (21:19 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 6 May 2020 21:19:48 +0000 (21:19 +0000)
src/Model/Item.php

index ff3ec9a72ed1f39377d8b5e8ea156f8907c6016d..44e00b09b31fc4cdb4a9d82b43ce69be0bd759a8 100644 (file)
@@ -1994,7 +1994,8 @@ class Item
                if ($transmit) {
                        $transmit_item = Item::selectFirst(['verb', 'origin'], ['id' => $item['id']]);
                        // Don't relay participation messages
-                       if (($transmit_item['verb'] == Activity::FOLLOW) && !$transmit_item['origin']) {
+                       if (($transmit_item['verb'] == Activity::FOLLOW) && 
+                               (!$transmit_item['origin'] || ($item['author-id'] != Contact::getPublicIdByUserId($uid)))) {
                                Logger::info('Participation messages will not be relayed', ['item' => $item['id'], 'uri' => $item['uri'], 'verb' => $transmit_item['verb']]);
                                $transmit = false;
                        }