]> git.mxchange.org Git - friendica.git/commitdiff
Respect "manually improve" during contact request
authorMichael <heluecht@pirati.ca>
Sat, 2 Nov 2019 16:20:17 +0000 (16:20 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 2 Nov 2019 16:20:17 +0000 (16:20 +0000)
src/Model/Contact.php

index c7cfddbb84a58e51d0611830fbca259237e7fcdb..a220b237d56acfc3c6dbdfaf52797a4bf17a08a0 100644 (file)
@@ -2298,7 +2298,16 @@ class Contact extends BaseObject
 
                $hidden = (($protocol === Protocol::MAIL) ? 1 : 0);
 
-               $pending = in_array($protocol, [Protocol::ACTIVITYPUB]);
+               if ($protocol == Protocol::ACTIVITYPUB) {
+                       $apcontact = APContact::getByURL($url, false);
+                       if (isset($apcontact['manually-approve'])) {
+                               $pending = (bool)$apcontact['manually-approve'];
+                       } else {
+                               $pending = true;
+                       }                       
+               } else {
+                       $pending = false;
+               }
 
                if (in_array($protocol, [Protocol::MAIL, Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
                        $writeable = 1;