]> git.mxchange.org Git - friendica.git/commitdiff
Long refresh periods for connector networks
authorMichael <heluecht@pirati.ca>
Wed, 17 May 2023 14:28:40 +0000 (14:28 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 17 May 2023 14:28:40 +0000 (14:28 +0000)
src/Model/Contact.php

index d8f2448da2fef7dec2564523f1784ff1aacd1871..99edf3fe2ba990d2774276d692383bfc2d034062 100644 (file)
@@ -2711,9 +2711,13 @@ class Contact
                } elseif ($has_local_data) {
                        $failed_next_update  = GServer::getNextUpdateDate(false, $created, $last_update, !in_array($contact['network'], Protocol::FEDERATED));
                        $success_next_update = GServer::getNextUpdateDate(true, $created, $last_update, !in_array($contact['network'], Protocol::FEDERATED));
-               } else {
+               } elseif (in_array($ret['network'], array_merge(Protocol::NATIVE_SUPPORT, [Protocol::ZOT, Protocol::PHANTOM]))) {
                        $failed_next_update  = DateTimeFormat::utc('now +6 month');
                        $success_next_update = DateTimeFormat::utc('now +1 month');
+               } else {
+                       // We don't check connector networks very often to not run into API rate limits
+                       $failed_next_update  = DateTimeFormat::utc('now +12 month');
+                       $success_next_update = DateTimeFormat::utc('now +12 month');
                }
 
                if (Strings::normaliseLink($contact['url']) != Strings::normaliseLink($ret['url'])) {