From 3b446fefbfde1ac9f8757f9bf654fbbfab03a413 Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 4 Aug 2009 08:39:43 +0000 Subject: [PATCH] Caldav: remove organizer line if current user is organizer for iPhone, will not remove line for events with attendees git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@643 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 6fb14398..7930cf82 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -1600,10 +1600,13 @@ public class ExchangeSession { result.writeLine("X-CALENDARSERVER-ACCESS:" + eventClass); } } - } else if ("END:VEVENT".equals(line)) { - if (!hasOrganizer) { + // remove organizer line if current user is organizer for iPhone + // will not remove line for events with attendees + } else if (fromServer && line.equals("ORGANIZER:MAILTO:" + email)) { + continue; + // add organizer line to all events created in Exchange for active sync + } else if (!fromServer && "END:VEVENT".equals(line) && !hasOrganizer) { result.writeLine("ORGANIZER:MAILTO:" + email); - } } result.writeLine(line); }