Skip to content

Commit 2382c89

Browse files
author
Jonas Heinrich
committed
Reset attendees participation on eventDrop
Signed-off-by: Jonas Heinrich <heinrich@synyx.de>
1 parent d9c2322 commit 2382c89

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/fullcalendar/interaction/eventDrop.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { getDurationValueFromFullCalendarDuration } from '../duration.js'
2323
import getTimezoneManager from '../../services/timezoneDataProviderService.js'
2424
import logger from '../../utils/logger.js'
2525
import { getObjectAtRecurrenceId } from '../../utils/calendarObject.js'
26+
import { mapEventComponentToEventObject } from '../../models/event.js'
2627

2728
/**
2829
* Returns a function to drop an event at a different position
@@ -68,6 +69,19 @@ export default function(store, fcAPI) {
6869
return
6970
}
7071

72+
// Reset attendees participation state to NEEDS-ACTION, since eventDrop
73+
// is always a signification change
74+
// Partly a workaround for Sabre-DAV not respecting RFC 6638 3.2.8, see
75+
// https://github.com/sabre-io/dav/issues/1282
76+
if (eventComponent.organizer && eventComponent.hasProperty('ATTENDEE')) {
77+
const organizer = eventComponent.getFirstProperty('ORGANIZER')
78+
for (const attendee of eventComponent.getAttendeeIterator()) {
79+
if (organizer.value !== attendee.value) {
80+
attendee.participationStatus = 'NEEDS-ACTION'
81+
}
82+
}
83+
}
84+
7185
try {
7286
// shiftByDuration may throw exceptions in certain cases
7387
eventComponent.shiftByDuration(deltaDuration, event.allDay, timezone, defaultAllDayDuration, defaultTimedDuration)

0 commit comments

Comments
 (0)