Commit 9f53931b authored by Mickaël Guessant's avatar Mickaël Guessant

Caldav: fix #657 Tentative events shows as accepted in Thunderbird with user provided patch

git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@2497 3d1905a2-6b24-0410-a738-b14d5a86fcbd
parent b6633288
......@@ -220,6 +220,11 @@ public class VCalendar extends VObject {
}
String cdoBusyStatus = vObject.getPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS");
if (cdoBusyStatus != null) {
// we set status only if it's tentative
if ("TENTATIVE".equals(cdoBusyStatus)) {
vObject.setPropertyValue("STATUS", "TENTATIVE");
}
// in all cases, we set the transparency (also called "show time as" in UI)
vObject.setPropertyValue("TRANSP",
!"FREE".equals(cdoBusyStatus) ? "OPAQUE" : "TRANSPARENT");
}
......
......@@ -1726,7 +1726,16 @@ public class EwsExchangeSession extends ExchangeSession {
updates.add(Field.createFieldUpdate("dtstart", convertCalendarDateToExchange(vCalendar.getFirstVeventPropertyValue("DTSTART"))));
updates.add(Field.createFieldUpdate("dtend", convertCalendarDateToExchange(vCalendar.getFirstVeventPropertyValue("DTEND"))));
}
updates.add(Field.createFieldUpdate("busystatus", "BUSY".equals(vCalendar.getFirstVeventPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS")) ? "Busy" : "Free"));
String status = vCalendar.getFirstVeventPropertyValue("STATUS");
if (status != null && "TENTATIVE".equals(status)) {
// this is a tentative event
updates.add(Field.createFieldUpdate("busystatus", "Tentative"));
} else {
// otherwise, we simply use the same value as before, as received from the server
updates.add(Field.createFieldUpdate("busystatus", vCalendar.getFirstVeventPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS")));
}
if ("Exchange2007_SP1".equals(serverVersion) && vCalendar.isCdoAllDay()) {
updates.add(Field.createFieldUpdate("meetingtimezone", vCalendar.getVTimezone().getPropertyValue("TZID")));
}
......
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