Commit f64b886d authored by Mickaël Guessant's avatar Mickaël Guessant

Caldav: optionally enable new EWS caldav implementation with davmail.caldavRealUpdate

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2519 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 12ff1377
......@@ -1776,19 +1776,20 @@ public class EwsExchangeSession extends ExchangeSession {
item
);
} else {
createOrUpdateItemMethod = new UpdateItemMethod(MessageDisposition.SaveOnly,
ConflictResolution.AutoResolve,
SendMeetingInvitationsOrCancellations.SendToAllAndSaveCopy,
currentItemId, buildFieldUpdates(vCalendar));
// force context Timezone on Exchange 2010 and 2013
if (serverVersion != null && serverVersion.startsWith("Exchange201")) {
createOrUpdateItemMethod.setTimezoneContext(EwsExchangeSession.this.getVTimezone().getPropertyValue("TZID"));
if (Settings.getBooleanProperty("davmail.caldavRealUpdate", false)) {
createOrUpdateItemMethod = new UpdateItemMethod(MessageDisposition.SaveOnly,
ConflictResolution.AutoResolve,
SendMeetingInvitationsOrCancellations.SendToAllAndSaveCopy,
currentItemId, buildFieldUpdates(vCalendar));
// force context Timezone on Exchange 2010 and 2013
if (serverVersion != null && serverVersion.startsWith("Exchange201")) {
createOrUpdateItemMethod.setTimezoneContext(EwsExchangeSession.this.getVTimezone().getPropertyValue("TZID"));
}
} else {
// old hard/delete approach on update
DeleteItemMethod deleteItemMethod = new DeleteItemMethod(currentItemId, DeleteType.HardDelete, SendMeetingCancellations.SendToNone);
executeMethod(deleteItemMethod);
}
// old hard/delete approach on update
/*if (currentItemId != null) {
DeleteItemMethod deleteItemMethod = new DeleteItemMethod(currentItemId, DeleteType.HardDelete, SendMeetingCancellations.SendToNone);
executeMethod(deleteItemMethod);
}*/
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment