]> git.mxchange.org Git - friendica.git/commitdiff
Changes:
authorRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2022 00:29:46 +0000 (02:29 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 23 Jun 2025 20:53:57 +0000 (22:53 +0200)
- Parameter `$nodeinfo_url` was no longer present, instead an instance of
  `ICanHandleHttpResponses` is now given (documentation updated)
- sorted a bit setting array values

src/Model/GServer.php

index 8ead59940852ac0c4c835dc3d758420920bb1378..8627b61e528e20d9af44b3046b63dd6aa4754f5e 100644 (file)
@@ -165,7 +165,6 @@ class GServer
         * @param string $pattern
         *
         * @return array
-        *
         * @throws Exception
         */
        public static function listByDomainPattern(string $pattern): array
@@ -290,7 +289,6 @@ class GServer
         * @param bool $undetected
         *
         * @return string
-        *
         * @throws Exception
         */
        public static function getNextUpdateDate(bool $success, string $created = '', string $last_contact = '', bool $undetected = false): string
@@ -813,6 +811,9 @@ class GServer
                }
 
                $serverdata['registered-users'] = $serverdata['registered-users'] ?? 0;
+               $serverdata['next_contact'] = self::getNextUpdateDate(true, '', '', in_array($serverdata['network'], [Protocol::PHANTOM, Protocol::FEED]));
+               $serverdata['last_contact'] = DateTimeFormat::utcNow();
+               $serverdata['failed'] = false;
 
                // Numbers above a reasonable value (10 millions) are ignored
                if ($serverdata['registered-users'] > 10000000) {
@@ -900,7 +901,6 @@ class GServer
         * @param string $server_url address of the server
         *
         * @return void
-        *
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        private static function discoverRelay(string $server_url)
@@ -1392,10 +1392,9 @@ class GServer
        /**
         * Parses NodeInfo2
         *
-        * @see https://github.com/jaywink/nodeinfo2
-        *
+        * @param ICanHandleHttpResponses $httpResult
         * @return array Server data
-        *
+        * @see https://github.com/jaywink/nodeinfo2/blob/master/PROTOCOL.md
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        private static function parseNodeinfo2(ICanHandleHttpResponses $httpResult): array