]> git.mxchange.org Git - friendica.git/commitdiff
Use Contact::isFollower instead
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 13 Dec 2018 16:53:15 +0000 (11:53 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 13 Dec 2018 16:53:15 +0000 (11:53 -0500)
src/Model/Profile.php

index 5f040f63ecc595d1e3053c9cf2dc4ee947f8fc56..0ebdcec004f83d4e7c931355987374e3b689ee49 100644 (file)
@@ -338,13 +338,7 @@ class Profile
                }
 
                // Is the remote user already connected to that user?
-               if ($connect && remote_user()
-                       && DBA::exists('contact', [
-                               'uid'  => $profile['uid'],
-                               'nurl' => Strings::normaliseLink(self::getMyURL()),
-                               'rel'  => [Contact::SHARING, Contact::FRIEND]
-                       ])
-               ) {
+               if ($connect && Contact::isFollower(remote_user(), $profile['uid'])) {
                        $connect = false;
                }