- if (in_array($contact['network'], [Protocol::MAIL, Protocol::FEED])) {
- $ratings = [0, 3, 7, 8, 9, 10];
- if (DI::config()->get('system', 'adjust_poll_frequency') && ($contact['network'] == Protocol::FEED)) {
- $rating = $contact['rating'];
- } elseif (array_key_exists($contact['priority'], $ratings)) {
- $rating = $ratings[$contact['priority']];
- } else {
- $rating = -1;
- }
- } else {
- // Check once a week per default for all other networks
- $rating = 9;
- }
-
- // Friendica and OStatus are checked once a day
- if (in_array($contact['network'], [Protocol::DFRN, Protocol::OSTATUS])) {
- $rating = 8;
- }
-
- // Check archived contacts or contacts with unsupported protocols once a month
- if ($contact['archive'] || in_array($contact['network'], [Protocol::ZOT, Protocol::PHANTOM])) {
- $rating = 10;
- }
-
- if ($rating < 0) {