From 3dbbbb69e428d1aa874ea97bf88020e05047f20f Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 17 May 2023 14:28:40 +0000 Subject: [PATCH] Long refresh periods for connector networks --- src/Model/Contact.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index d8f2448da..99edf3fe2 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -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'])) {