X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FPollContacts.php;h=ba908cb8f3b1b7b01e097d70852f8462276d0887;hb=b9bb525fe91c176ada2323c2d628291a27594d59;hp=b4312ef0c3022cab852d8b97f57ab3facde3a411;hpb=4939be065ed289aba565e23c9e409c1b11f822e8;p=friendica.git diff --git a/src/Worker/PollContacts.php b/src/Worker/PollContacts.php index b4312ef0c3..ba908cb8f3 100644 --- a/src/Worker/PollContacts.php +++ b/src/Worker/PollContacts.php @@ -1,6 +1,6 @@ [Protocol::FEED, Protocol::MAIL, Protocol::OSTATUS], 'self' => false, 'blocked' => false]; + $condition = ['network' => [Protocol::FEED, Protocol::MAIL, Protocol::OSTATUS], 'self' => false, 'blocked' => false, 'archive' => false]; if (!empty($abandon_days)) { $condition = DBA::mergeConditions($condition, - ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed` AND `login_date` > ?)", 0, DateTimeFormat::utc('now - ' . $abandon_days . ' days')]); + ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed` AND `last-activity` > ?)", 0, DateTimeFormat::utc('now - ' . $abandon_days . ' days')]); } else { $condition = DBA::mergeConditions($condition, ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed`)", 0]); @@ -71,11 +71,11 @@ class PollContacts } if ((($contact['network'] == Protocol::FEED) && ($contact['priority'] <= 3)) || ($contact['network'] == Protocol::MAIL)) { - $priority = PRIORITY_MEDIUM; + $priority = Worker::PRIORITY_MEDIUM; } elseif ($contact['archive']) { - $priority = PRIORITY_NEGLIGIBLE; + $priority = Worker::PRIORITY_NEGLIGIBLE; } else { - $priority = PRIORITY_LOW; + $priority = Worker::PRIORITY_LOW; } Logger::notice("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);