diff options
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 11 | ||||
-rw-r--r-- | Zotlabs/Daemon/Poller.php | 8 |
2 files changed, 14 insertions, 5 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 01c43262a..d1c516f96 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -50,14 +50,19 @@ class Cron { // expire any expired items - $r = q("select id from item where expires > '2001-01-01 00:00:00' and expires < %s + $r = q("select id,item_wall from item where expires > '2001-01-01 00:00:00' and expires < %s and item_deleted = 0 ", db_utcnow() ); if($r) { require_once('include/items.php'); - foreach($r as $rr) - drop_item($rr['id'],false); + foreach($r as $rr) { + drop_item($rr['id'],false,(($rr['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL)); + if($rr['item_wall']) { + // The notifier isn't normally invoked unless item_drop is interactive. + Zotlabs\Daemon\Master::Summon( [ 'Notifier', 'drop', $rr['id'] ] ); + } + } } diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php index e4bc9c143..49151437c 100644 --- a/Zotlabs/Daemon/Poller.php +++ b/Zotlabs/Daemon/Poller.php @@ -71,14 +71,18 @@ class Poller { $randfunc = db_getfunc('RAND'); - $contacts = q("SELECT * FROM abook LEFT JOIN xchan on abook_xchan = xchan_hash + $contacts = q("SELECT abook.abook_updated, abook.abook_connected, abook.abook_feed, + abook.abook_channel, abook.abook_id, abook.abook_archived, abook.abook_pending, + abook.abook_ignored, abook.abook_blocked, + xchan.xchan_network, + account.account_lastlog, account.account_flags + FROM abook LEFT JOIN xchan on abook_xchan = xchan_hash LEFT JOIN account on abook_account = account_id where abook_self = 0 $sql_extra AND (( account_flags = %d ) OR ( account_flags = %d )) $abandon_sql ORDER BY $randfunc", intval(ACCOUNT_OK), intval(ACCOUNT_UNVERIFIED) // FIXME - ); if($contacts) { |