Skip to content

Commit

Permalink
event.isRecurring() does not repeat with RECURRENCE-ID without RANGE
Browse files Browse the repository at this point in the history
Evolution creates instances of events, which contain RRULE and RECURRENCE-ID
without RANGE parameter.  Since the RANGE is not THISANDFUTURE, but absent,
such events do not recur.

https://gitlab.gnome.org/GNOME/evolution/-/issues/1180

kewisch#457
ES6-ready
  • Loading branch information
dilyanpalauzov committed Apr 14, 2024
1 parent 560cff3 commit 786c0fd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/ical/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,18 @@ class Event {
}

/**
* Checks if the event is recurring
* Checks if the event is recurring, thus has an RRULE or RDATE property, or a
* RECURRENCE-ID with the respective RANGE parameter.
*
* @return {Boolean} True, if event is recurring
*/
isRecurring() {
let comp = this.component;
return comp.hasProperty('rrule') || comp.hasProperty('rdate');
let comp = this.component, recurrenceId;
if (comp.hasProperty('rrule') || comp.hasProperty('rdate')) {
recurrenceId = comp.getFirstProperty('recurrence-id');
return !recurrenceId || !!recurrenceId.getParameter('range');
}
return false;
}

/**
Expand Down

0 comments on commit 786c0fd

Please sign in to comment.