Commit 3cda61a3 authored by Mickaël Guessant's avatar Mickaël Guessant

Caldav: temporarily restore hard/delete approach on update over EWS

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2515 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent 4e936d9e
......@@ -1738,8 +1738,8 @@ public class EwsExchangeSession extends ExchangeSession {
} else {
// update existing item
if (currentItemId != null) {
if (vCalendar.isMeeting() && !vCalendar.isMeetingOrganizer()) {
if (currentItemId != null && /*) {
if (*/vCalendar.isMeeting() && !vCalendar.isMeetingOrganizer()) {
// This is a meeting response
EWSMethod.Item item = new EWSMethod.Item();
......@@ -1750,8 +1750,8 @@ public class EwsExchangeSession extends ExchangeSession {
getFolderId(SENT),
item
);
} else {
createOrUpdateItemMethod = new UpdateItemMethod(MessageDisposition.SaveOnly,
/*} else {
/*createOrUpdateItemMethod = new UpdateItemMethod(MessageDisposition.SaveOnly,
ConflictResolution.AutoResolve,
SendMeetingInvitationsOrCancellations.SendToAllAndSaveCopy,
currentItemId, buildFieldUpdates(vCalendar));
......@@ -1759,8 +1759,13 @@ public class EwsExchangeSession extends ExchangeSession {
if (serverVersion != null && serverVersion.startsWith("Exchange201")) {
createOrUpdateItemMethod.setTimezoneContext(EwsExchangeSession.this.getVTimezone().getPropertyValue("TZID"));
}
}
}*/
} else {
// old hard/delete approach on update
if (currentItemId != null) {
DeleteItemMethod deleteItemMethod = new DeleteItemMethod(currentItemId, DeleteType.HardDelete, SendMeetingCancellations.SendToNone);
executeMethod(deleteItemMethod);
}
// create
EWSMethod.Item newItem = new EWSMethod.Item();
newItem.type = "CalendarItem";
......
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