return;
}
- if (($contact['network'] != Protocol::MAIL) || $force) {
+ if (($contact['network'] != Protocol::MAIL) && $force) {
Contact::updateFromProbe($contact_id);
}
return;
}
+ // Don't poll local contacts
+ if (User::getIdForURL($contact['url'])) {
+ Logger::info('Local contacts are not polled', ['id' => $contact['id']]);
+
+ // set the last-update so we don't keep polling
+ DBA::update('contact', ['last-update' => $updated], ['id' => $contact['id']]);
+ return;
+ }
+
// We don't poll AP contacts by now
if ($protocol === Protocol::ACTIVITYPUB) {
Logger::log("Don't poll AP contact");
Logger::log("Mail: no mails for ".$mailconf['user']);
}
+ self::updateContact($contact, ['failed' => false, 'last-update' => $updated, 'success_update' => $updated]);
+ Contact::unmarkForArchival($contact);
+
Logger::log("Mail: closing connection for ".$mailconf['user']);
imap_close($mbox);
}