Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/caldav/caldav.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ export class CalDAVService {
if (err) {
throw err;
}
const data = result['d:multistatus']['d:response'];
const data = result['D:multistatus']['D:response'];
const resultEvents: CalendarEvent[] = [];
if (data) {
data.forEach((eventXML) => {
const iCalendarData = eventXML['d:propstat'][0]['d:prop'][0]['cal:calendar-data'][0];
const iCalendarData = eventXML['D:propstat'][0]['D:prop'][0]['C:calendar-data'][0]['_'];
const calendarEvent = this.parseToCalendarEvent(iCalendarData);
resultEvents.push(calendarEvent);
});
Expand Down Expand Up @@ -325,6 +325,10 @@ class RecurrenceIterator{
}

public next() {
return this._event.getOccurrenceDetails(this._iter.next());
const next = this._iter.next();
if (next)
return this._event.getOccurrenceDetails(next);
else
return false;
}
}
6 changes: 3 additions & 3 deletions src/rules.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as config from './config';

export function ShouldCopy(summary: string, markedFree: boolean): boolean {
const forceSharing = summary.includes(config.FORCE_SHARING_SIGN);
const forceSharing = summary && summary.includes(config.FORCE_SHARING_SIGN);
return forceSharing || !markedFree;
};

export function NewSummary(summary: string, redactedSummary?: string): string {
if (redactedSummary && !summary.includes(config.FORCE_SHARING_SIGN)) return redactedSummary;
if (redactedSummary && summary && !summary.includes(config.FORCE_SHARING_SIGN)) return redactedSummary;
return summary;
}
}