Merge pull request #2866 from kolbyjack/broadcast-duplicate-events

Include duplicate events in broadcasts
This commit is contained in:
Michael Teeuw 2022-06-17 15:32:17 +02:00 committed by GitHub
commit da0489fc0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View File

@ -20,6 +20,7 @@ _This release is scheduled to be released on 2022-07-01._
- Use latest node 18 when running tests on github actions
- Update `electron` to v19 and other dependencies.
- Use internal fetch function of node instead external `node-fetch` library if used node version >= `v18`.
- Include duplicate events in broadcasts.
### Fixed

View File

@ -496,23 +496,21 @@ Module.register("calendar", {
for (const e in calendar) {
const event = JSON.parse(JSON.stringify(calendar[e])); // clone object
if (event.endDate < now && limitNumberOfEntries) {
continue;
}
if (this.config.hidePrivate) {
if (event.class === "PRIVATE") {
if (this.config.hidePrivate && event.class === "PRIVATE") {
// do not add the current event, skip it
continue;
}
}
if (this.config.hideOngoing && limitNumberOfEntries) {
if (event.startDate < now) {
if (limitNumberOfEntries) {
if (event.endDate < now) {
continue;
}
if (this.config.hideOngoing && event.startDate < now) {
continue;
}
if (this.listContainsEvent(events, event)) {
continue;
}
}
event.url = calendarUrl;
event.today = event.startDate >= today && event.startDate < today + 24 * 60 * 60 * 1000;