]> git.mxchange.org Git - friendica.git/commitdiff
Prevent polling contact of blocked users
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 26 Jul 2023 05:49:55 +0000 (07:49 +0200)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 2 Aug 2023 19:53:10 +0000 (21:53 +0200)
src/Worker/PollContacts.php

index ba908cb8f3b1b7b01e097d70852f8462276d0887..81ce0f8f0e7457255c6cf5aa2793e8a6ed0b42ec 100644 (file)
@@ -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);