Partial fix for missing items on Exchange 2010
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2010 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
fd3e99862e
commit
bc0c0b5b40
|
@ -212,6 +212,7 @@ public class VCalendar extends VObject {
|
||||||
if (isCdoAllDay(vObject)) {
|
if (isCdoAllDay(vObject)) {
|
||||||
setClientAllday(vObject.getProperty("DTSTART"));
|
setClientAllday(vObject.getProperty("DTSTART"));
|
||||||
setClientAllday(vObject.getProperty("DTEND"));
|
setClientAllday(vObject.getProperty("DTEND"));
|
||||||
|
setClientAllday(vObject.getProperty("RECURRENCE-ID"));
|
||||||
}
|
}
|
||||||
String cdoBusyStatus = vObject.getPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS");
|
String cdoBusyStatus = vObject.getPropertyValue("X-MICROSOFT-CDO-BUSYSTATUS");
|
||||||
if (cdoBusyStatus != null) {
|
if (cdoBusyStatus != null) {
|
||||||
|
|
|
@ -1322,7 +1322,7 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||||
String instancetype = response.get(Field.get("instancetype").getResponseName());
|
String instancetype = response.get(Field.get("instancetype").getResponseName());
|
||||||
boolean isrecurring = "true".equals(response.get(Field.get("isrecurring").getResponseName()));
|
boolean isrecurring = "true".equals(response.get(Field.get("isrecurring").getResponseName()));
|
||||||
String calendaritemtype = response.get(Field.get("calendaritemtype").getResponseName());
|
String calendaritemtype = response.get(Field.get("calendaritemtype").getResponseName());
|
||||||
isException = "3".equals(instancetype) || (isrecurring && "Single".equals(calendaritemtype));
|
isException = "3".equals(instancetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1643,13 +1643,17 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||||
content = getICS(new SharedByteArrayInputStream(content));
|
content = getICS(new SharedByteArrayInputStream(content));
|
||||||
}
|
}
|
||||||
VCalendar localVCalendar = new VCalendar(content, email, getVTimezone());
|
VCalendar localVCalendar = new VCalendar(content, email, getVTimezone());
|
||||||
// remove additional reminder
|
|
||||||
if (!"true".equals(getItemMethod.getResponseItem().get(Field.get("reminderset").getResponseName()))) {
|
|
||||||
localVCalendar.removeVAlarm();
|
|
||||||
}
|
|
||||||
String calendaruid = getItemMethod.getResponseItem().get(Field.get("calendaruid").getResponseName());
|
String calendaruid = getItemMethod.getResponseItem().get(Field.get("calendaruid").getResponseName());
|
||||||
if (calendaruid != null) {
|
|
||||||
localVCalendar.setFirstVeventPropertyValue("UID", calendaruid);
|
if ("Exchange2007_SP1".equals(serverVersion)) {
|
||||||
|
// remove additional reminder
|
||||||
|
if (!"true".equals(getItemMethod.getResponseItem().get(Field.get("reminderset").getResponseName()))) {
|
||||||
|
localVCalendar.removeVAlarm();
|
||||||
|
}
|
||||||
|
if (calendaruid != null) {
|
||||||
|
localVCalendar.setFirstVeventPropertyValue("UID", calendaruid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
List<EWSMethod.Attendee> attendees = getItemMethod.getResponseItem().getAttendees();
|
List<EWSMethod.Attendee> attendees = getItemMethod.getResponseItem().getAttendees();
|
||||||
if (attendees != null) {
|
if (attendees != null) {
|
||||||
|
@ -1674,14 +1678,19 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||||
for (EWSMethod.Occurrence occurrence : occurences) {
|
for (EWSMethod.Occurrence occurrence : occurences) {
|
||||||
if (modifiedOccurrencesIterator.hasNext()) {
|
if (modifiedOccurrencesIterator.hasNext()) {
|
||||||
VObject modifiedOccurrence = modifiedOccurrencesIterator.next();
|
VObject modifiedOccurrence = modifiedOccurrencesIterator.next();
|
||||||
// fix uid, should be the same as main VEVENT
|
// TODO: fix modified occurences attendees
|
||||||
if (calendaruid != null) {
|
|
||||||
modifiedOccurrence.setPropertyValue("UID", calendaruid);
|
if ("Exchange2007_SP1".equals(serverVersion)) {
|
||||||
}
|
// fix uid, should be the same as main VEVENT
|
||||||
VProperty recurrenceId = modifiedOccurrence.getProperty("RECURRENCE-ID");
|
if (calendaruid != null) {
|
||||||
if (recurrenceId != null) {
|
modifiedOccurrence.setPropertyValue("UID", calendaruid);
|
||||||
recurrenceId.removeParam("TZID");
|
}
|
||||||
recurrenceId.getValues().set(0, convertDateFromExchange(occurrence.originalStart));
|
|
||||||
|
VProperty recurrenceId = modifiedOccurrence.getProperty("RECURRENCE-ID");
|
||||||
|
if (recurrenceId != null) {
|
||||||
|
recurrenceId.removeParam("TZID");
|
||||||
|
recurrenceId.getValues().set(0, convertDateFromExchange(occurrence.originalStart));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue