From 373612a0465c924f5365d0e8d3a505da04b7a99f Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Feb 2021 15:05:49 +0000 Subject: do not poll feeds if feed_contacts are not allowed --- Zotlabs/Daemon/Onepoll.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Zotlabs/Daemon/Onepoll.php b/Zotlabs/Daemon/Onepoll.php index 85394c8d0..598cf28e4 100644 --- a/Zotlabs/Daemon/Onepoll.php +++ b/Zotlabs/Daemon/Onepoll.php @@ -23,9 +23,15 @@ class Onepoll { return; } + $sql_extra = ''; + $allow_feeds = get_config('system', 'feed_contacts'); + if(!$allow_feeds) { + $sql_extra = ' and abook_feed = 0 '; + } + $contacts = q("SELECT abook.*, xchan.*, account.* FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan - where abook_id = %d + where abook_id = %d $sql_extra and abook_pending = 0 and abook_archived = 0 and abook_blocked = 0 and abook_ignored = 0 AND (( account_flags = %d ) OR ( account_flags = %d )) limit 1", intval($contact_id), -- cgit v1.2.3