From 56768b40add32f4c7b5e992bfa8c8fafaba39ec3 Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 14 May 2010 10:52:50 +0000 Subject: [PATCH] Caldav: workaround for iCal bug: do not notify if reply explicitly not requested git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1054 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- .../davmail/exchange/ExchangeSession.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 64a07ff8..b28ee933 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -2742,14 +2742,19 @@ public class ExchangeSession { // exclude current user and invalid values from recipients // also exclude no action attendees } else if (!email.equalsIgnoreCase(value) && value.indexOf('@') >= 0 + // return all attendees for user calendar folder, filter for notifications && (!isNotification - || line.indexOf("RSVP=TRUE") >= 0 - || line.indexOf("PARTSTAT=NEEDS-ACTION") >= 0 - // need to include other PARTSTATs participants for CANCEL notifications - || line.indexOf("PARTSTAT=ACCEPTED") >= 0 - || line.indexOf("PARTSTAT=DECLINED") >= 0 - || line.indexOf("PARTSTAT=TENTATIVE") >= 0 - )) { + // notify attendee if reply explicitly requested + || (line.indexOf("RSVP=TRUE") >= 0) + || ( + // workaround for iCal bug: do not notify if reply explicitly not requested + !(line.indexOf("RSVP=FALSE") >= 0) && + ((line.indexOf("PARTSTAT=NEEDS-ACTION") >= 0 + // need to include other PARTSTATs participants for CANCEL notifications + || line.indexOf("PARTSTAT=ACCEPTED") >= 0 + || line.indexOf("PARTSTAT=DECLINED") >= 0 + || line.indexOf("PARTSTAT=TENTATIVE") >= 0)) + ))) { if (line.indexOf("ROLE=OPT-PARTICIPANT") >= 0) { optionalAttendees.add(value); } else {