Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix bug in e-mail scheduling

Kailash Nadh07856d34a2c5
diff --git a/queries.sql b/queries.sql
index f07bfade..75e9c4db 100644
--- a/queries.sql
+++ b/queries.sql
@@ -442,7 +442,7 @@ WITH camps AS (
SELECT campaigns.*, COALESCE(templates.body, (SELECT body FROM templates WHERE is_default = true LIMIT 1)) AS template_body
FROM campaigns
LEFT JOIN templates ON (templates.id = campaigns.template_id)
- WHERE (status='running' OR (status='scheduled' AND campaigns.send_at >= NOW()))
+ WHERE (status='running' OR (status='scheduled' AND NOW() >= campaigns.send_at))
AND NOT(campaigns.id = ANY($1::INT[]))
),
campLists AS (