From dfc1338e907835ad0d56b72f2439746512f11dc5 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 4 Aug 2011 19:45:20 +0000 Subject: [PATCH] EWS: use isrecurring with Exchange 2010 and instancetype with Exchange 2007 git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1757 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ews/EwsExchangeSession.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/java/davmail/exchange/ews/EwsExchangeSession.java b/src/java/davmail/exchange/ews/EwsExchangeSession.java index 10e59054..d9df659c 100644 --- a/src/java/davmail/exchange/ews/EwsExchangeSession.java +++ b/src/java/davmail/exchange/ews/EwsExchangeSession.java @@ -1495,9 +1495,14 @@ public class EwsExchangeSession extends ExchangeSession { @Override protected Condition getCalendarItemCondition(boolean excludeTasks, Condition dateCondition) { - // tasks in calendar not supported over EWS - return or(isTrue("isrecurring"), - and(isFalse("isrecurring"), dateCondition)); + if ("Exchange2010".equals(serverVersion)) { + // tasks in calendar not supported over EWS + return or(isTrue("isrecurring"), + and(isFalse("isrecurring"), dateCondition)); + } else { + return or(isEqualTo("instancetype", 1), + and(isEqualTo("instancetype", 0), dateCondition)); + } } @Override