]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/OnePoll.php
Fix: Feeds and mail accounts hadn't been fetched reliably
[friendica.git] / src / Worker / OnePoll.php
index 867b11fd3018550b8e1bcd0c8f83663810fb237f..5fc65b211a1d4f4414d896c64ef1d64c5f737f97 100644 (file)
@@ -104,14 +104,14 @@ class OnePoll
                }
 
                // Don't poll local contacts
-               if (Contact::isLocalById($contact['id'])) {
+               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");
@@ -708,6 +708,9 @@ class OnePoll
                        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);
        }