From: Hypolite Petovan Date: Wed, 26 Jul 2023 05:49:55 +0000 (+0200) Subject: Prevent polling contact of blocked users X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a905cdfd095a5bb1a1f78654f7ce2c23d2b1347b;p=friendica.git Prevent polling contact of blocked users --- diff --git a/src/Worker/PollContacts.php b/src/Worker/PollContacts.php index ba908cb8f3..81ce0f8f0e 100644 --- a/src/Worker/PollContacts.php +++ b/src/Worker/PollContacts.php @@ -45,10 +45,10 @@ class PollContacts 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 `last-activity` > ?)", 0, DateTimeFormat::utc('now - ' . $abandon_days . ' days')]); + ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `blocked` AND 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]); + ["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `blocked` AND NOT `account_expired` AND NOT `account_removed`)", 0]); } $contacts = DBA::select('contact', ['id', 'nick', 'name', 'network', 'archive', 'last-update', 'priority', 'rating'], $condition);