fix: strike through cancelled events and mute their reminders #572

This commit is contained in:
Linus Rath
2026-07-07 23:26:36 +02:00
parent c3a97de62f
commit e066698938
5 changed files with 38 additions and 8 deletions
+13
View File
@@ -302,6 +302,19 @@ describe('getPendingAlerts', () => {
expect(result).toHaveLength(0);
});
it('skips alerts for cancelled events', () => {
// iTIP CANCEL marks the attendee's copy with status "cancelled" instead
// of deleting it (#572) - its reminders must not fire.
const event = makeEvent({
status: 'cancelled',
alerts: { 'a1': makeAlert() },
});
const calendars = [makeCalendar()];
const now = fiveMinBefore + 1000;
const result = getPendingAlerts([event], calendars, new Set(), now);
expect(result).toHaveLength(0);
});
it('skips email action alerts', () => {
const event = makeEvent({
alerts: { 'a1': makeAlert({ action: 'email' }) },