1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-11-11 20:05:03 -05:00

Caldav: fix regression in getItem, allow urn:content-classes:calendarmessage contentClass

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1044 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-05-13 12:35:09 +00:00
parent 2f28151a64
commit 42023dd69a

View File

@ -3097,7 +3097,7 @@ public class ExchangeSession {
} catch (HttpNotFoundException hnfe) {
// failover for Exchange 2007 plus encoding issue
String decodedEventName = convertItemNameToEML(itemName).replaceAll("_xF8FF_", "/").replaceAll("_x003F_", "?").replaceAll("'", "''");
LOGGER.debug("Item not found at "+itemPath+", search by displayname: '"+decodedEventName+ '\'');
LOGGER.debug("Item not found at " + itemPath + ", search by displayname: '" + decodedEventName + '\'');
ExchangeSession.MessageList messages = searchMessages(folderPath, " AND \"DAV:displayname\"='" + decodedEventName + '\'');
if (!messages.isEmpty()) {
item = getItem(messages.get(0).getPermanentUrl());
@ -3125,7 +3125,8 @@ public class ExchangeSession {
"contentclass", DAV);
if ("urn:content-classes:person".equals(contentClass)) {
return new Contact(responses[0]);
} else if ("urn:content-classes:appointment".equals(contentClass)) {
} else if ("urn:content-classes:appointment".equals(contentClass)
|| "urn:content-classes:calendarmessage".equals(contentClass)) {
return new Event(responses[0]);
} else {
throw new DavMailException("EXCEPTION_EVENT_NOT_FOUND");