@coozzy/cal-dav
Advanced tools
Comparing version 2.3.9 to 2.4.0
@@ -192,2 +192,20 @@ "use strict"; | ||
_logger.default.debug(`Method updateEventProperties executed for eventUrl: ${eventUrl}`, event, title, description, location, startDate, endDate, attendees, categories, organizerEmail, prodid, privateEvent, frequencyInterval, endDateFrequency, countFrequency, alarms); | ||
const originalSubcomponents = event.component.getAllSubcomponents(); | ||
const originalProperties = event.component.getAllProperties(); | ||
const newEventComponent = new ICAL.Component('vevent'); | ||
// Add back all properties | ||
for (const prop of originalProperties) { | ||
newEventComponent.addProperty(prop); | ||
} | ||
// Add back all subcomponents except VALARM | ||
for (const sub of originalSubcomponents) { | ||
if (sub.name !== 'valarm') { | ||
newEventComponent.addSubcomponent(sub); | ||
} | ||
} | ||
// Replace the old event component with the new one | ||
event.component = newEventComponent; | ||
event.component.removeAllProperties('categories'); | ||
@@ -212,20 +230,2 @@ event.component.removeAllProperties('attendee'); | ||
this.addFrequency(event, frequencyInterval, undefined, countFrequency); | ||
const originalSubcomponents = event.component.getAllSubcomponents(); | ||
const originalProperties = event.component.getAllProperties(); | ||
const newEventComponent = new ICAL.Component('vevent'); | ||
// Add back all properties | ||
for (const prop of originalProperties) { | ||
newEventComponent.addProperty(prop); | ||
} | ||
// Add back all subcomponents except VALARM | ||
for (const sub of originalSubcomponents) { | ||
if (sub.name !== 'valarm') { | ||
newEventComponent.addSubcomponent(sub); | ||
} | ||
} | ||
// Replace the old event component with the new one | ||
event.component = newEventComponent; | ||
event.summary = title; | ||
@@ -232,0 +232,0 @@ event.description = description; |
{ | ||
"name": "@coozzy/cal-dav", | ||
"version": "2.3.9", | ||
"version": "2.4.0", | ||
"description": "Simple cal dav client.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -304,5 +304,26 @@ import * as ICAL from 'ical.js'; | ||
const originalSubcomponents = event.component.getAllSubcomponents(); | ||
const originalProperties = event.component.getAllProperties(); | ||
const newEventComponent = new ICAL.Component('vevent'); | ||
// Add back all properties | ||
for (const prop of originalProperties) { | ||
newEventComponent.addProperty(prop); | ||
} | ||
// Add back all subcomponents except VALARM | ||
for (const sub of originalSubcomponents) { | ||
if (sub.name !== 'valarm') { | ||
newEventComponent.addSubcomponent(sub); | ||
} | ||
} | ||
// Replace the old event component with the new one | ||
event.component = newEventComponent; | ||
event.component.removeAllProperties('categories'); | ||
event.component.removeAllProperties('attendee'); | ||
event.component.removeAllProperties('class'); | ||
if (privateEvent) { | ||
@@ -327,22 +348,4 @@ event.component.addPropertyWithValue('CLASS', 'PRIVATE'); | ||
const originalSubcomponents = event.component.getAllSubcomponents(); | ||
const originalProperties = event.component.getAllProperties(); | ||
const newEventComponent = new ICAL.Component('vevent'); | ||
// Add back all properties | ||
for (const prop of originalProperties) { | ||
newEventComponent.addProperty(prop); | ||
} | ||
// Add back all subcomponents except VALARM | ||
for (const sub of originalSubcomponents) { | ||
if (sub.name !== 'valarm') { | ||
newEventComponent.addSubcomponent(sub); | ||
} | ||
} | ||
// Replace the old event component with the new one | ||
event.component = newEventComponent; | ||
event.summary = title; | ||
@@ -349,0 +352,0 @@ event.description = description; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90443