]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/UpdateGContact.php
Fix: some selected item fields hadn't been selected
[friendica.git] / src / Worker / UpdateGContact.php
index fda1a650b4e7824ef7c6c8e20963f918615dcb5f..94e4d07d7b7c91370b8842f1217a407bc0188151 100644 (file)
@@ -29,21 +29,20 @@ class UpdateGContact
 {
        /**
         * Update global contact via probe
-        * @param string  $url            Global contact url
+        * @param string  $url     Global contact url
         * @param string  $command
-        * @param integer $following_gcid gcontact ID of the contact that is followed by this one
-        * @param integer $follower_gcid  gcontact ID of the contact that is following this one
         */
-       public static function execute(string $url, string $command = '', int $following_gcid = 0, int $follower_gcid = 0)
+       public static function execute(string $url, string $command = '')
        {
                $force = ($command == "force");
+               $nodiscover = ($command == "nodiscover");
 
                $success = GContact::updateFromProbe($url, $force);
 
                Logger::info('Updated from probe', ['url' => $url, 'force' => $force, 'success' => $success]);
 
-               if ($success && DI::config()->get('system', 'gcontact_discovery')) {
-                       GContact::discoverFollowers($url, $following_gcid, $follower_gcid);
+               if ($success && !$nodiscover && (DI::config()->get('system', 'gcontact_discovery') == GContact::DISCOVERY_RECURSIVE)) {
+                       GContact::discoverFollowers($url);
                }
        }
 }