diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e85d1e..347b439 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project follows [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Fixed + +- Contact-only events (no registration possible) were still getting the daily summary email — it now skips them since there's nothing to summarize. + ## [1.9.1] - 2026-08-22 ### Fixed diff --git a/backend/src/utils/notifications.js b/backend/src/utils/notifications.js index fd6eccb..ab1db57 100644 --- a/backend/src/utils/notifications.js +++ b/backend/src/utils/notifications.js @@ -1370,14 +1370,14 @@ async function sendDailyEventSummaries(now = new Date()) { const today = new Date(now); const notifyInclude = { createdBy: { select: { id: true, name: true, email: true } }, notifyRecipients: { select: { id: true, name: true, email: true } } }; let events = await prisma.event.findMany({ - where: { isActive: true, startDate: { gte: today } }, + where: { isActive: true, startDate: { gte: today }, requiresRegistration: true }, include: notifyInclude, orderBy: { startDate: 'asc' }, }); try { events = await prisma.event.findMany({ - where: { isActive: true, startDate: { gte: today }, goLiveAt: { lte: today } }, + where: { isActive: true, startDate: { gte: today }, goLiveAt: { lte: today }, requiresRegistration: true }, include: notifyInclude, orderBy: { startDate: 'asc' }, });