From 2d72c31d23e602858248334fafb25894eb6c7325 Mon Sep 17 00:00:00 2001 From: Shawn Bulen Date: Sat, 14 Nov 2026 14:36:49 -0800 Subject: [PATCH] Clean up digest sends Signed-off-by: Shawn Bulen --- Sources/Tasks/SendDigests.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/Tasks/SendDigests.php b/Sources/Tasks/SendDigests.php index 960e4828c1..9a2355dead 100644 --- a/Sources/Tasks/SendDigests.php +++ b/Sources/Tasks/SendDigests.php @@ -50,6 +50,7 @@ public function execute(): bool $members = []; $langs = []; $notify = []; + $boards = []; $request = Db::$db->query( 'SELECT ln.id_topic, COALESCE(t.id_board, ln.id_board) AS id_board, mem.email_address, mem.member_name, @@ -164,11 +165,11 @@ public function execute(): bool $types[$row['note_type']][$row['id_board']]['lines'][$row['id_topic']]['members'] = []; - if (!empty($notify['topics'][$row['id_topic']])) { + if (!empty($notify['topics'][$row['id_topic']]) && ($row['note_type'] == 'reply')) { $types[$row['note_type']][$row['id_board']]['lines'][$row['id_topic']]['members'] = array_merge($types[$row['note_type']][$row['id_board']]['lines'][$row['id_topic']]['members'], $notify['topics'][$row['id_topic']]); } - if (!empty($notify['boards'][$row['id_board']])) { + if (!empty($notify['boards'][$row['id_board']]) && ($row['note_type'] == 'topic')) { $types[$row['note_type']][$row['id_board']]['lines'][$row['id_topic']]['members'] = array_merge($types[$row['note_type']][$row['id_board']]['lines'][$row['id_topic']]['members'], $notify['boards'][$row['id_board']]); } } @@ -216,7 +217,7 @@ public function execute(): bool $notify_types = !empty($prefs[$mid]['msg_notify_type']) ? $prefs[$mid]['msg_notify_type'] : 1; // Did they not elect to choose this? - if ($frequency < 3 || $frequency == 4 && !$is_weekly || $frequency == 3 && $is_weekly || $notify_types == 4) { + if (($frequency < 3) || (($frequency == 4) && !$is_weekly) || (($frequency == 3) && $is_weekly) || ($notify_types == 4)) { continue; }