This commit is contained in:
@@ -37,11 +37,9 @@ const serializeIcalEvent = (icalevent: iCalEvent): string => {
|
||||
returnString += 'DTSTART;TZID=Europe/Berlin:' + icalevent.start;
|
||||
returnString += 'DTEND;TZID=Europe/Berlin:' + icalevent.end;
|
||||
returnString += 'SUMMARY:' + icalevent.summary;
|
||||
returnString += 'DESCRIPTION:' + icalevent.description;
|
||||
returnString += 'LOCATION:' + icalevent.location;
|
||||
if(!isNullOrBlank(icalevent.url)) {
|
||||
returnString += 'URL:' + icalevent.url;
|
||||
}
|
||||
if(!isNullOrBlank(icalevent.description)) returnString += 'DESCRIPTION:' + icalevent.description;
|
||||
if(!isNullOrBlank(icalevent.location)) returnString += 'LOCATION:' + icalevent.location;
|
||||
if(!isNullOrBlank(icalevent.url)) returnString += 'URL:' + icalevent.url;
|
||||
returnString += icalevent.footer;
|
||||
|
||||
return returnString;
|
||||
@@ -84,6 +82,8 @@ const addEventToFile = (ical: iCalFile, event: Event) => {
|
||||
};
|
||||
|
||||
const createIcalEvent = (event: Event): iCalEvent => {
|
||||
let description = event.description ? event.description + '\n' : '';
|
||||
let location = event.location ? event.location + '\n' : '';
|
||||
let url = event.url ? event.url + '\n' : '';
|
||||
|
||||
return {
|
||||
@@ -94,8 +94,8 @@ const createIcalEvent = (event: Event): iCalEvent => {
|
||||
start: formatDate(event.startDateTime) + '\n',
|
||||
end: formatDate(event.endDateTime) + '\n',
|
||||
summary: event.name + '\n',
|
||||
description: event.description + '\n',
|
||||
location: event.location + '\n',
|
||||
description: description,
|
||||
location: location,
|
||||
url: url,
|
||||
footer: 'END:VEVENT\n'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user