]> git.mxchange.org Git - friendica.git/commitdiff
Avoid to do the follow stuff for the public user
authorMichael <heluecht@pirati.ca>
Fri, 5 Oct 2018 20:10:10 +0000 (20:10 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 5 Oct 2018 20:10:10 +0000 (20:10 +0000)
src/Protocol/ActivityPub/Receiver.php

index 14b5e93bac56ec4cab0536b35614c7763da0581b..5c644176f02db55d42443c4165836456a4879d48 100644 (file)
@@ -382,7 +382,7 @@ class Receiver
                Contact::updateAvatar($photo, $uid, $cid);
 
                // Send a new follow request to be sure that the connection still exists
-               if (DBA::exists('contact', ['id' => $cid, 'rel' => [Contact::SHARING, Contact::FRIEND]])) {
+               if (($uid != 0) && DBA::exists('contact', ['id' => $cid, 'rel' => [Contact::SHARING, Contact::FRIEND]])) {
                        ActivityPub\Transmitter::sendActivity('Follow', $profile['url'], $uid);
                        logger('Send a new follow request to ' . $profile['url'] . ' for user ' . $uid, LOGGER_DEBUG);
                }