Narrow reminder window to exact day to prevent re-fires on restart; v1.1.29
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -25,7 +25,7 @@ async function checkReminders() {
|
||||
if (isNaN(publish.getTime())) continue
|
||||
const reminderDate = new Date(publish)
|
||||
reminderDate.setUTCDate(reminderDate.getUTCDate() - ep.reminderDays)
|
||||
if (todayKey >= toDateKey(reminderDate) && todayKey <= toDateKey(publish)) {
|
||||
if (todayKey === toDateKey(reminderDate)) {
|
||||
const sent = await sendReminderEmail({
|
||||
label: ep.episodeNumber ? `Episode ${ep.episodeNumber}` : 'Episode',
|
||||
title: ep.title || 'Untitled',
|
||||
@@ -50,7 +50,7 @@ async function checkReminders() {
|
||||
if (isNaN(publish.getTime())) continue
|
||||
const reminderDate = new Date(publish)
|
||||
reminderDate.setUTCDate(reminderDate.getUTCDate() - ev.reminderDays)
|
||||
if (todayKey >= toDateKey(reminderDate) && todayKey <= toDateKey(publish)) {
|
||||
if (todayKey === toDateKey(reminderDate)) {
|
||||
const sent = await sendReminderEmail({
|
||||
label: ev.type.charAt(0).toUpperCase() + ev.type.slice(1),
|
||||
title: ev.title,
|
||||
|
||||
Reference in New Issue
Block a user